KVM: VMX: Drop initialization of IA32_FEAT_CTL MSR
authorSean Christopherson <sean.j.christopherson@intel.com>
Sat, 21 Dec 2019 04:45:08 +0000 (20:45 -0800)
committerBorislav Petkov <bp@suse.de>
Mon, 13 Jan 2020 18:04:37 +0000 (19:04 +0100)
commit21bd3467a58ea51ccc0b1d9bcb86dadf1640a002
tree8e012b46ae7da6386d3838e3a0c3a9c49cd97161
parent85c17291e2eb4903bf73e5d3f588f41dbcc6f115
KVM: VMX: Drop initialization of IA32_FEAT_CTL MSR

Remove KVM's code to initialize IA32_FEAT_CTL MSR when KVM is loaded now
that the MSR is initialized during boot on all CPUs that support VMX,
i.e. on all CPUs that can possibly load kvm_intel.

Note, don't WARN if IA32_FEAT_CTL is unlocked, even though the MSR is
unconditionally locked by init_ia32_feat_ctl().  KVM isn't tied directly
to a CPU vendor detection, whereas init_ia32_feat_ctl() is invoked if
and only if the CPU vendor is recognized and known to support VMX.  As a
result, vmx_disabled_by_bios() may be reached without going through
init_ia32_feat_ctl() and thus without locking IA32_FEAT_CTL.  This quirk
will be eliminated in a future patch.

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