@@ -2192,31 +2192,7 @@ static __init int cpu_has_kvm_support(void)
static __init int vmx_disabled_by_bios(void)
{
- u64 msr;
-
- rdmsrl(MSR_IA32_FEATURE_CONTROL, msr);
-
- if (WARN_ON_ONCE(!(msr & FEAT_CTL_LOCKED)))
- return 1;
-
- /* launched w/ TXT and VMX disabled */
- if (!(msr & FEAT_CTL_VMX_ENABLED_INSIDE_SMX) &&
- tboot_enabled())
- return 1;
- /* launched w/o TXT and VMX only enabled w/ TXT */
- if (!(msr & FEAT_CTL_VMX_ENABLED_OUTSIDE_SMX) &&
- (msr & FEAT_CTL_VMX_ENABLED_INSIDE_SMX) &&
- !tboot_enabled()) {
- pr_warn("kvm: disable TXT in the BIOS or "
- "activate TXT before enabling KVM\n");
- return 1;
- }
- /* launched w/o TXT and VMX disabled */
- if (!(msr & FEAT_CTL_VMX_ENABLED_OUTSIDE_SMX) &&
- !tboot_enabled())
- return 1;
-
- return 0;
+ return !boot_cpu_has(X86_FEATURE_VMX);
}
static void kvm_cpu_vmxon(u64 addr)