The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 0/4] KVM: x86/mmu: Fix pre-fault and map private loops
@ 2026-08-06 21:40 Sean Christopherson
  2026-08-06 21:40 ` [PATCH 1/4] KVM: x86/mmu: Reload MMU on *every* page pre-fault attempt/iteration Sean Christopherson
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Sean Christopherson @ 2026-08-06 21:40 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini
  Cc: kvm, linux-kernel, Kai Huang, Yan Zhao, Rick Edgecombe,
	Sashiko Bot

Fix a bug in the pre-fault path where KVM fails to reload an invalidated
MMU root, which puts the KVM_PRE_FAULT_MEMORY task into an infinite loop
(although it's breakable, so not fatal to the host).  My best guess is that
the test started failing once PREEMPT_LAZY was enabled by default.

Then harden the similar "map private PFN" to also guard against unexpected
root invalidations, because Sashiko keeps pointing out that it's theoretically
possible for that code to end up in the same type of infinite loop.

Sean Christopherson (4):
  KVM: x86/mmu: Reload MMU on *every* page pre-fault attempt/iteration
  KVM: x86/mmu: Harden "map private PFN" against unexpected root
    invalidation
  KVM: x86/mmu: Top-up memory caches when retrying "map private PFN"
  KVM: x86/mmu: Add sanity check to detect stale page faults in "map
    private PFN"

 arch/x86/kvm/mmu/mmu.c | 45 +++++++++++++++++++++++++++---------------
 1 file changed, 29 insertions(+), 16 deletions(-)


base-commit: a806d364ef288a6443a1337820ea8410a7ccc6b3
-- 
2.55.0.679.g6767b8d81c-goog


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

end of thread, other threads:[~2026-08-07 22:18 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-06 21:40 [PATCH 0/4] KVM: x86/mmu: Fix pre-fault and map private loops Sean Christopherson
2026-08-06 21:40 ` [PATCH 1/4] KVM: x86/mmu: Reload MMU on *every* page pre-fault attempt/iteration Sean Christopherson
2026-08-07  8:58   ` Huang, Kai
2026-08-07 19:04   ` Edgecombe, Rick P
2026-08-07 19:11     ` Sean Christopherson
2026-08-06 21:40 ` [PATCH 2/4] KVM: x86/mmu: Harden "map private PFN" against unexpected root invalidation Sean Christopherson
2026-08-07 20:26   ` Edgecombe, Rick P
2026-08-07 22:18     ` Sean Christopherson
2026-08-06 21:40 ` [PATCH 3/4] KVM: x86/mmu: Top-up memory caches when retrying "map private PFN" Sean Christopherson
2026-08-07 20:38   ` Edgecombe, Rick P
2026-08-07 22:13     ` Sean Christopherson
2026-08-06 21:40 ` [PATCH 4/4] KVM: x86/mmu: Add sanity check to detect stale page faults in " Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox