Commit 575ff2dc authored by Avi Kivity's avatar Avi Kivity

KVM: VMX: Zero ept module parameter if ept is not present

Allows reading back hardware capability.
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent 919818ab
...@@ -265,7 +265,7 @@ static inline int cpu_has_vmx_ept(void) ...@@ -265,7 +265,7 @@ static inline int cpu_has_vmx_ept(void)
static inline int vm_need_ept(void) static inline int vm_need_ept(void)
{ {
return (cpu_has_vmx_ept() && enable_ept); return enable_ept;
} }
static inline int vm_need_virtualize_apic_accesses(struct kvm *kvm) static inline int vm_need_virtualize_apic_accesses(struct kvm *kvm)
...@@ -1205,6 +1205,9 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf) ...@@ -1205,6 +1205,9 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf)
if (!cpu_has_vmx_vpid()) if (!cpu_has_vmx_vpid())
enable_vpid = 0; enable_vpid = 0;
if (!cpu_has_vmx_ept())
enable_ept = 0;
min = 0; min = 0;
#ifdef CONFIG_X86_64 #ifdef CONFIG_X86_64
min |= VM_EXIT_HOST_ADDR_SPACE_SIZE; min |= VM_EXIT_HOST_ADDR_SPACE_SIZE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment