diff options
author | Avi Kivity <avi@redhat.com> | 2009-03-23 18:25:15 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-06-10 11:48:32 +0300 |
commit | 575ff2dcb25608d53737d1126ee0e7e4d6f11752 (patch) | |
tree | 7d9345eeb046a616549d9edc16334af3f662f81d /arch/x86 | |
parent | 919818abc2ca0721f1cd296fbc24601d9044f993 (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')
-rw-r--r-- | arch/x86/kvm/vmx.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 9b97c8e3cfd..2f65120cf28 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) 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) @@ -1205,6 +1205,9 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf) if (!cpu_has_vmx_vpid()) enable_vpid = 0; + if (!cpu_has_vmx_ept()) + enable_ept = 0; + min = 0; #ifdef CONFIG_X86_64 min |= VM_EXIT_HOST_ADDR_SPACE_SIZE; |