All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM: x86/mmu: Use page-track only for... page tracking
@ 2022-11-10  1:48 Sean Christopherson
  2022-11-10  1:48 ` [PATCH 1/2] KVM: x86/mmu: Don't rely on page-track mechanism to flush on memslot change Sean Christopherson
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Sean Christopherson @ 2022-11-10  1:48 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini; +Cc: kvm, linux-kernel, Yan Zhao

Don't bounce through the page-track notifier when zapping+flushing SPTEs
in response to memslot changes as the need to zap+flush isn't strictly
limited to page-tracking.  With that done, register KVM's notifier on the
first allocation of a shadow root, as KVM's ->track_write() hook is used
only to react to writes to gPTEs.

Aside from avoiding a RETPOLINE on emulated writes, dropping KVM's internal
use will allow removing ->track_flush_slot() altogether once KVM-GT moves
to a different hook[*].  Tracking "flushes" of slots is a poor fit for
KVM-GT's needs as KVM-GT needs to drop its write-protection only when a
memslot change is guaranteed to be committed, whereas the "flush" call is
speculative in the sense that KVM may abort a memslot update after flushing
the original memslot.

https://lore.kernel.org/all/20221108084416.11447-1-yan.y.zhao@intel.com

Sean Christopherson (2):
  KVM: x86/mmu: Don't rely on page-track mechanism to flush on memslot
    change
  KVM: x86/mmu: Register page-tracker on first shadow root allocation

 arch/x86/include/asm/kvm_host.h |  1 +
 arch/x86/kvm/mmu/mmu.c          | 24 ++++++++----------------
 arch/x86/kvm/x86.c              |  2 ++
 3 files changed, 11 insertions(+), 16 deletions(-)


base-commit: d663b8a285986072428a6a145e5994bc275df994
-- 
2.38.1.431.g37b22c650d-goog


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-11-11 19:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-10  1:48 [PATCH 0/2] KVM: x86/mmu: Use page-track only for... page tracking Sean Christopherson
2022-11-10  1:48 ` [PATCH 1/2] KVM: x86/mmu: Don't rely on page-track mechanism to flush on memslot change Sean Christopherson
2022-11-10  2:27   ` Yan Zhao
2022-11-10 17:08     ` Sean Christopherson
2022-11-11  2:18       ` Yan Zhao
2022-11-10  1:48 ` [PATCH 2/2] KVM: x86/mmu: Register page-tracker on first shadow root allocation Sean Christopherson
2022-11-11 19:24 ` [PATCH 0/2] KVM: x86/mmu: Use page-track only for... page tracking Sean Christopherson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.