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

Commit f0b98c02 authored by Jim Mattson's avatar Jim Mattson Committed by Radim Krčmář
Browse files

kvm: vmx: Don't use INVVPID when EPT is enabled



According to the Intel SDM, volume 3, section 28.3.2: Creating and
Using Cached Translation Information, "No linear mappings are used
while EPT is in use." INVEPT will invalidate both the guest-physical
mappings and the combined mappings in the TLBs and paging-structure
caches, so an INVVPID is superfluous.

Signed-off-by: default avatarJim Mattson <jmattson@google.com>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
parent 715958f9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -4017,11 +4017,12 @@ static void exit_lmode(struct kvm_vcpu *vcpu)

static inline void __vmx_flush_tlb(struct kvm_vcpu *vcpu, int vpid)
{
	vpid_sync_context(vpid);
	if (enable_ept) {
		if (!VALID_PAGE(vcpu->arch.mmu.root_hpa))
			return;
		ept_sync_context(construct_eptp(vcpu->arch.mmu.root_hpa));
	} else {
		vpid_sync_context(vpid);
	}
}