Commit fdf288bf authored by David Hildenbrand's avatar David Hildenbrand Committed by Paolo Bonzini

KVM: VMX: call ept_sync_global() with enable_ept only

ept_* function should only be called with enable_ept being set.
Reviewed-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
parent 0e1252dc
...@@ -3542,7 +3542,8 @@ static int hardware_enable(void) ...@@ -3542,7 +3542,8 @@ static int hardware_enable(void)
wrmsrl(MSR_IA32_FEATURE_CONTROL, old | test_bits); wrmsrl(MSR_IA32_FEATURE_CONTROL, old | test_bits);
} }
kvm_cpu_vmxon(phys_addr); kvm_cpu_vmxon(phys_addr);
ept_sync_global(); if (enable_ept)
ept_sync_global();
return 0; return 0;
} }
......
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