KVM: x86/mmu: Skip remote TLB flush when zapping all of TDP MMU
authorSean Christopherson <seanjc@google.com>
Sat, 26 Feb 2022 00:15:32 +0000 (00:15 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 8 Mar 2022 14:31:54 +0000 (09:31 -0500)
commit77c8cd6b85af8840878063eb2df39780e808f74b
treefd7a9300d940d896b052d347741fdce5785a71e4
parentc10743a1824b9db449eb631745ed6f2d3cdf9762
KVM: x86/mmu: Skip remote TLB flush when zapping all of TDP MMU

Don't flush the TLBs when zapping all TDP MMU pages, as the only time KVM
uses the slow version of "zap everything" is when the VM is being
destroyed or the owning mm has exited.  In either case, KVM_RUN is
unreachable for the VM, i.e. the guest TLB entries cannot be consumed.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Ben Gardon <bgardon@google.com>
Message-Id: <20220226001546.360188-15-seanjc@google.com>
Reviewed-by: Mingwei Zhang <mizhang@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/tdp_mmu.c