]> git.ipfire.org Git - thirdparty/libvirt.git/commit
cpu-gather: Move msr decoding to new script
authorTim Wiederhake <twiederh@redhat.com>
Tue, 15 Dec 2020 16:24:53 +0000 (17:24 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 18 Dec 2020 22:19:53 +0000 (23:19 +0100)
commit3e04b68ccd19a4bd0d86348620ce5e45bca04409
tree75b3f7f9e94bbbe2a7b551fb6307c3925cae77cd
parent7f59cbcc16e702dc9df98131dc619ed54f51bdad
cpu-gather: Move msr decoding to new script

Fixes the leaking file descriptors. Does not silently ignore errors
(e.g. permission denied on /dev/cpu/0/msr if run as non-root) and
always attempt to read from /dev/kvm if /dev/cpu/0/msr failed.

'gather_msr()' returns a dictionary of values, as a later patch will
add more registers to be interrogated.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/cputestdata/cpu-gather.py
tests/cputestdata/cpu-gather.sh