]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: x86/mmu: Don't try to unprotect an INVALID_GPA
authorSean Christopherson <seanjc@google.com>
Sat, 31 Aug 2024 00:15:27 +0000 (17:15 -0700)
committerSean Christopherson <seanjc@google.com>
Tue, 10 Sep 2024 03:16:27 +0000 (20:16 -0700)
commitb7e948898e772ac900950c0dac4ca90e905cd0c0
tree1315855354876cb2a77c1f128b9aabcc21032a23
parent2df354e37c1398a85bb43cbbf1f913eb3f91d035
KVM: x86/mmu: Don't try to unprotect an INVALID_GPA

If getting the gpa for a gva fails, e.g. because the gva isn't mapped in
the guest page tables, don't try to unprotect the invalid gfn.  This is
mostly a performance fix (avoids unnecessarily taking mmu_lock), as
for_each_gfn_valid_sp_with_gptes() won't explode on garbage input, it's
simply pointless.

Link: https://lore.kernel.org/r/20240831001538.336683-13-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/mmu/mmu.c