提交 93ba03c2 编写于 作者: S Sheng Yang 提交者: Avi Kivity

KVM: VMX: Fix feature testing

The testing of feature is too early now, before vmcs_config complete initialization.
Signed-off-by: NSheng Yang <sheng@linux.intel.com>
Signed-off-by: NAvi Kivity <avi@redhat.com>
上级 04547156
......@@ -1208,15 +1208,6 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf)
vmx_capability.ept, vmx_capability.vpid);
}
if (!cpu_has_vmx_vpid())
enable_vpid = 0;
if (!cpu_has_vmx_ept())
enable_ept = 0;
if (!cpu_has_vmx_flexpriority())
flexpriority_enabled = 0;
min = 0;
#ifdef CONFIG_X86_64
min |= VM_EXIT_HOST_ADDR_SPACE_SIZE;
......@@ -1320,6 +1311,15 @@ static __init int hardware_setup(void)
if (boot_cpu_has(X86_FEATURE_NX))
kvm_enable_efer_bits(EFER_NX);
if (!cpu_has_vmx_vpid())
enable_vpid = 0;
if (!cpu_has_vmx_ept())
enable_ept = 0;
if (!cpu_has_vmx_flexpriority())
flexpriority_enabled = 0;
return alloc_kvm_area();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册