]> asedeno.scripts.mit.edu Git - linux.git/commit
KVM: VMX: Use VMX feature flag to query BIOS enabling
authorSean Christopherson <sean.j.christopherson@intel.com>
Sat, 21 Dec 2019 04:45:09 +0000 (20:45 -0800)
committerBorislav Petkov <bp@suse.de>
Mon, 13 Jan 2020 18:19:32 +0000 (19:19 +0100)
commita4d0b2fdbcf75ef6654713c83c316ea3a661ddc3
tree3fe066e0bc85f112fcbfd6bcb31026acc5e5c10d
parent21bd3467a58ea51ccc0b1d9bcb86dadf1640a002
KVM: VMX: Use VMX feature flag to query BIOS enabling

Replace KVM's manual checks on IA32_FEAT_CTL with a query on the boot
CPU's MSR_IA32_FEAT_CTL and VMX feature flags.  The MSR_IA32_FEAT_CTL
indicates that IA32_FEAT_CTL has been configured and that dependent
features are accurately reflected in cpufeatures, e.g. the VMX flag is
now cleared during boot if VMX isn't fully enabled via IA32_FEAT_CTL,
including the case where the MSR isn't supported.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20191221044513.21680-16-sean.j.christopherson@intel.com
arch/x86/kvm/vmx/vmx.c