[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 12 Dec 2019 19:52:55 +0200
From: Liran Alon <liran.alon@...cle.com>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: Sean Christopherson <sean.j.christopherson@...el.com>,
Borislav Petkov <bp@...en8.de>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>,
Peter Zijlstra <peterz@...radead.org>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Radim Krčmář <rkrcmar@...hat.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>,
Tony Luck <tony.luck@...el.com>,
Tony W Wang-oc <TonyWWang-oc@...oxin.com>,
Len Brown <lenb@...nel.org>, Shuah Khan <shuah@...nel.org>,
linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
linux-edac@...r.kernel.org, linux-pm@...r.kernel.org,
linux-kselftest@...r.kernel.org,
Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
Subject: Re: [PATCH v4 11/19] x86/cpu: Print VMX flags in /proc/cpuinfo using
VMX_FEATURES_*
> On 12 Dec 2019, at 19:47, Paolo Bonzini <pbonzini@...hat.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
Powered by blists - more mailing lists