KVM: x86/mmu: Stop needlessly making MMU pages available for TDP MMU faults
authorDavid Matlack <dmatlack@google.com>
Wed, 21 Sep 2022 17:35:45 +0000 (10:35 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 27 Dec 2022 11:03:00 +0000 (06:03 -0500)
Stop calling make_mmu_pages_available() when handling TDP MMU faults.
The TDP MMU does not participate in the "available MMU pages" tracking
and limiting so calling this function is unnecessary work when handling
TDP MMU faults.

Signed-off-by: David Matlack <dmatlack@google.com>
Reviewed-by: Isaku Yamahata <isaku.yamahata@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220921173546.2674386-10-dmatlack@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c

index 7b10bff..dfac473 100644 (file)
@@ -4408,10 +4408,6 @@ static int kvm_tdp_mmu_page_fault(struct kvm_vcpu *vcpu,
        if (is_page_fault_stale(vcpu, fault))
                goto out_unlock;
 
-       r = make_mmu_pages_available(vcpu);
-       if (r)
-               goto out_unlock;
-
        r = kvm_tdp_mmu_map(vcpu, fault);
 
 out_unlock: