Re: [PATCH 34/36] vircpuhost: Add support for reading MSRs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 11, 2019 at 17:13:51 +0100, Daniel P. Berrangé wrote:
> On Mon, Apr 08, 2019 at 10:42:38AM +0200, Jiri Denemark wrote:
> > The new virHostCPUGetMSR internal API will try to read the MSR from
> > /dev/cpu/0/msr and if it is not possible (the device does not exist or
> > libvirt is running unprivileged), it will fallback to asking KVM for the
> > MSR using KVM_GET_MSRS ioctl.
> 
> Is there benefit to using /dev/cpu/0/msr, instead of always using
> /dev/kvm ?

KVM may report some bits in the IA32_ARCH_CAPABILITIES MSR even when the
host does not set them or even support MSR at all. So for reporting host
capabilities /dev/cpu/0/msr is IMHO better. We will still get the made
up bits in the MSR via QEMU for host-model.

For example, on my laptop which does not support IA32_ARCH_CAPABILITIES
MSR at all I get 0x8 when asking KVM, while reading /dev/cpu/0/msr
returns I/O error since the MSR does not exist.

Jirka

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux