Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5f51586 authored by David Hildenbrand's avatar David Hildenbrand Committed by Paolo Bonzini
Browse files

KVM: VMX: require INVEPT GLOBAL for EPT



Without this, we won't be able to do any flushes, so let's just require
it. Should be absent in very strange configurations.

Suggested-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
parent fdf288bf
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1598,7 +1598,6 @@ static inline void vpid_sync_context(int vpid)

static inline void ept_sync_global(void)
{
	if (cpu_has_vmx_invept_global())
	__invept(VMX_EPT_EXTENT_GLOBAL, 0, 0);
}

@@ -6747,7 +6746,8 @@ static __init int hardware_setup(void)

	if (!cpu_has_vmx_ept() ||
	    !cpu_has_vmx_ept_4levels() ||
	    !cpu_has_vmx_ept_mt_wb()) {
	    !cpu_has_vmx_ept_mt_wb() ||
	    !cpu_has_vmx_invept_global()) {
		enable_ept = 0;
		enable_unrestricted_guest = 0;
		enable_ept_ad_bits = 0;