diff options
| author | Sean Christopherson <seanjc@google.com> | 2026-07-09 13:49:39 -0700 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-07-10 09:01:11 -0700 |
| commit | db095727ff5739f4f46ee641ee6ef450032886db (patch) | |
| tree | 2241c6fd04b3d6892e71e659ef5464ef5de6c0af /include/linux/timerqueue.h | |
| parent | b27622c4eeb125814081baaefe9175191be5b94d (diff) | |
KVM: x86/mmu: Use split "zap all fast" helpers when invalidating memslot
Manually invoke the front half and back half of the "zap all fast" flow
when invalidating a memslot so that mmu_lock is acquired at function scope
in kvm_arch_flush_shadow_memslot(). This will allow putting more code
inside the critical section without having to take mmu_lock twice in quick
succession.
Opportunistically open code checking whether or not to do the fast zap, to
discourage removing the local "zap_all" in a future cleanup, i.e. to ensure
the SLOT_ZAP_ALL quirk is queried exactly once. Processing the front half
but not the back half of the fast zap (if SLOT_ZAP_ALL were disabled
concurrently) would result in KVM unnecessarily keeping invalid TDP MMU
roots until the VM is destroyed.
No functional change intended.
Cc: stable@vger.kernel.org # 6.12.x
Reviewed-by: Michael Roth <michael.roth@amd.com>
Link: https://patch.msgid.link/20260709204948.1988414-10-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
