OSDN Git Service

KVM: x86/mmu: Coalesce TLB flushes when zapping collapsible SPTEs
authorSean Christopherson <seanjc@google.com>
Fri, 26 Mar 2021 02:19:42 +0000 (19:19 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 17 Apr 2021 12:30:54 +0000 (08:30 -0400)
commit142ccde1f7b1b0c621c299cbcc8feb6353f7cc92
treeacc9b4e04c6be87c7bc1f63b05355553f7a528e2
parent302695a5747e82267c344d177cdd4866cbccee8e
KVM: x86/mmu: Coalesce TLB flushes when zapping collapsible SPTEs

Gather pending TLB flushes across both the legacy and TDP MMUs when
zapping collapsible SPTEs to avoid multiple flushes if both the legacy
MMU (for nested guests) and TDP MMU have mappings for the memslot.

Note, this also optimizes the TDP MMU to flush only the relevant range
when running as L1 with Hyper-V enlightenments.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210326021957.1424875-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