summaryrefslogtreecommitdiff
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2017-08-24 21:51:29 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2017-10-12 15:01:52 +0300
commitfdf288bf726a491ff1e300c245194be48a6882fd (patch)
treec4e2941b12cee72c985d65bf91a5392d4782b701 /arch/x86/kvm
parent0e1252dc46b9c9a805d704cf3a123132ebb0f8cf (diff)
downloadlinux-fdf288bf726a491ff1e300c245194be48a6882fd.tar.xz
KVM: VMX: call ept_sync_global() with enable_ept only
ept_* function should only be called with enable_ept being set. Reviewed-by: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: David Hildenbrand <david@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r--arch/x86/kvm/vmx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index c757070a32a7..7d944d3feb8a 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -3542,7 +3542,8 @@ static int hardware_enable(void)
wrmsrl(MSR_IA32_FEATURE_CONTROL, old | test_bits);
}
kvm_cpu_vmxon(phys_addr);
- ept_sync_global();
+ if (enable_ept)
+ ept_sync_global();
return 0;
}