Messages in this thread | | | Subject | Re: [PATCH v4 11/19] x86/cpu: Print VMX flags in /proc/cpuinfo using VMX_FEATURES_* | From | Liran Alon <> | Date | Thu, 12 Dec 2019 19:52:55 +0200 |
| |
> On 12 Dec 2019, at 19:47, Paolo Bonzini <pbonzini@redhat.com> wrote: > > On 12/12/19 18:43, Sean Christopherson wrote: >> Key word being "usually". My intent in printing out partially redundant >> flags was to help users debug/understand why the combined feature isn't >> supported. E.g. userspace can already easily (relatively speaking) query >> flexpriority support via /sys/module/kvm_intel/parameters/flexpriority. >> But if that comes back "N", the user has no way to determine exactly why >> flexpriority is disabled. > > There are tools such as vmxcap. It is part of QEMU, but I wouldn't mind > moving it into the kernel tree. > > Paolo >
True. But it relies on /dev/msr0 (exposed from msr kernel module) to be able to read any host arbitrary MSR. It’s much more elegant to just report CPU VMX features in a /proc/cpuinfo pseudo-file and don’t require strong privileges. Why should CPU VMX features be treated differently than standard CPUID deduced features? CPU SVM features are also present in /proc/cpuinfo today (Because they are deduced from CPUID leafs). So it should be similar.
-Liran
| |