KVM: x86/mmu: Coalesce TDP MMU TLB flushes when zapping collapsible SPTEs
authorSean Christopherson <seanjc@google.com>
Fri, 26 Mar 2021 02:19:40 +0000 (19:19 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 17 Apr 2021 12:30:53 +0000 (08:30 -0400)
commitaf95b53e56e34a4df343cec32b3a3276d9d06ad3
tree33022d7d39e727818a886ef3781e6dd73dc948bf
parentc28fa560c5bb4a58b362622beb0ca8479a480636
KVM: x86/mmu: Coalesce TDP MMU TLB flushes when zapping collapsible SPTEs

When zapping collapsible SPTEs across multiple roots, gather pending
flushes and perform a single remote TLB flush at the end, as opposed to
flushing after processing every root.

Note, flush may be cleared by the result of zap_collapsible_spte_range().
This is intended and correct, e.g. yielding may have serviced a prior
pending flush.

Cc: Ben Gardon <bgardon@google.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210326021957.1424875-2-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/tdp_mmu.c