• Sean Christopherson's avatar
    KVM: x86/mmu: Revert "Revert "KVM: MMU: collapse TLB flushes when zap all pages"" · 4506ecf4
    Sean Christopherson authored
    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 f34d251d.
    Signed-off-by: default avatarSean Christopherson <sean.j.christopherson@intel.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    4506ecf4
mmu.c 162 KB