KVM: x86/mmu: Zap only the target TDP MMU shadow page in NX recovery
authorSean Christopherson <seanjc@google.com>
Sat, 26 Feb 2022 00:15:31 +0000 (00:15 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 8 Mar 2022 14:31:54 +0000 (09:31 -0500)
commitc10743a1824b9db449eb631745ed6f2d3cdf9762
tree3362bc12ca7de299efe05f95c886c1af2b09a375
parent626808d137b72ae35878d7b7832cd192bd533fba
KVM: x86/mmu: Zap only the target TDP MMU shadow page in NX recovery

When recovering a potential hugepage that was shattered for the iTLB
multihit workaround, precisely zap only the target page instead of
iterating over the TDP MMU to find the SP that was passed in.  This will
allow future simplification of zap_gfn_range() by having it zap only
leaf SPTEs.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220226001546.360188-14-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu_internal.h
arch/x86/kvm/mmu/tdp_iter.h
arch/x86/kvm/mmu/tdp_mmu.c
arch/x86/kvm/mmu/tdp_mmu.h