]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Remove spurious TLB flushes in TDP MMU zap collapsible path
authorSean Christopherson <seanjc@google.com>
Sat, 20 Nov 2021 04:50:21 +0000 (04:50 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 30 Nov 2021 08:09:25 +0000 (03:09 -0500)
commit536e203d8d08ed4096388a6618d7808a159cd3f2
treef261696b2e266d3e7e847e90fa6f93af52197c3f
parentf4dfb9dfc4a84d9e52e5168d23dc9fa8e8710a7a
KVM: x86/mmu: Remove spurious TLB flushes in TDP MMU zap collapsible path

Drop the "flush" param and return values to/from the TDP MMU's helper for
zapping collapsible SPTEs.  Because the helper runs with mmu_lock held
for read, not write, it uses tdp_mmu_zap_spte_atomic(), and the atomic
zap handles the necessary remote TLB flush.

Similarly, because mmu_lock is dropped and re-acquired between zapping
legacy MMUs and zapping TDP MMUs, kvm_mmu_zap_collapsible_sptes() must
handle remote TLB flushes from the legacy MMU before calling into the TDP
MMU.

Fixes: 08763ffdb3a23 ("KVM: x86/mmu: Skip rmap operations if rmaps not allocated")
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20211120045046.3940942-4-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/mmu/tdp_mmu.c
arch/x86/kvm/mmu/tdp_mmu.h