]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: x86/mmu: Don't flush TLBs when clearing Dirty bit in shadow MMU
authorSean Christopherson <seanjc@google.com>
Fri, 11 Oct 2024 02:10:37 +0000 (19:10 -0700)
committerSean Christopherson <seanjc@google.com>
Wed, 30 Oct 2024 21:46:46 +0000 (14:46 -0700)
commit856cf4a60cffbffb31a429761bf605108dbf5ff4
treed10ae3979f593185b3f0cd82acc4f84e603672cc
parentb7ed46b201a41a2f63bc104a66f33c65e1b44fbf
KVM: x86/mmu: Don't flush TLBs when clearing Dirty bit in shadow MMU

Don't force a TLB flush when an SPTE update in the shadow MMU happens to
clear the Dirty bit, as KVM unconditionally flushes TLBs when enabling
dirty logging, and when clearing dirty logs, KVM flushes based on its
software structures, not the SPTEs.  I.e. the flows that care about
accurate Dirty bit information already ensure there are no stale TLB
entries.

Opportunistically drop is_dirty_spte() as mmu_spte_update() was the sole
caller.

Link: https://lore.kernel.org/r/20241011021051.1557902-6-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/mmu/spte.h