]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Revert "Revert "KVM: MMU: collapse TLB flushes when zap all pages""
authorSean Christopherson <sean.j.christopherson@intel.com>
Fri, 13 Sep 2019 02:46:08 +0000 (19:46 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 24 Sep 2019 12:35:41 +0000 (14:35 +0200)
commit41101a548e7a7cfe9a6631840f6e4bd76f454324
tree4741d26769bb601c42bb5c731bdbe6433e081c7c
parentb30ac19c6a92d05166b2910bad1a26e0e9a68c3c
KVM: x86/mmu: Revert "Revert "KVM: MMU: collapse TLB flushes when zap all pages""

Now that the fast invalidate mechanism has been reintroduced, restore
the performance tweaks for fast invalidation that existed prior to its
removal.

Paraphrashing the original changelog:

  Reload the mmu on all vCPUs after updating the generation number so
  that obsolete pages are not used by any vCPUs.  This allows collapsing
  all TLB flushes during obsolete page zapping into a single flush, as
  there is no need to flush when dropping mmu_lock (to reschedule).

  Note: a remote TLB flush is still needed before freeing the pages as
  other vCPUs may be doing a lockless shadow page walk.

Opportunstically improve the comments restored by the revert (the
code itself is a true revert).

This reverts commit 72b633af22872a77ba13f2188e95c0c1a31af354.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu.c