aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-03-23 12:25:15 -0400
committerAvi Kivity <avi@redhat.com>2009-06-10 04:48:32 -0400
commit575ff2dcb25608d53737d1126ee0e7e4d6f11752 (patch)
tree7d9345eeb046a616549d9edc16334af3f662f81d /arch/x86/kvm/vmx.c
parent919818abc2ca0721f1cd296fbc24601d9044f993 (diff)
KVM: VMX: Zero ept module parameter if ept is not present
Allows reading back hardware capability. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r--arch/x86/kvm/vmx.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 9b97c8e3cfd1..2f65120cf283 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -265,7 +265,7 @@ static inline int cpu_has_vmx_ept(void)
265 265
266static inline int vm_need_ept(void) 266static inline int vm_need_ept(void)
267{ 267{
268 return (cpu_has_vmx_ept() && enable_ept); 268 return enable_ept;
269} 269}
270 270
271static inline int vm_need_virtualize_apic_accesses(struct kvm *kvm) 271static 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 if (!cpu_has_vmx_vpid()) 1205 if (!cpu_has_vmx_vpid())
1206 enable_vpid = 0; 1206 enable_vpid = 0;
1207 1207
1208 if (!cpu_has_vmx_ept())
1209 enable_ept = 0;
1210
1208 min = 0; 1211 min = 0;
1209#ifdef CONFIG_X86_64 1212#ifdef CONFIG_X86_64
1210 min |= VM_EXIT_HOST_ADDR_SPACE_SIZE; 1213 min |= VM_EXIT_HOST_ADDR_SPACE_SIZE;