mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM: remove the dummy allocation case from async page fault handling
@ 2026-11-03 12:49 Paolo Bonzini
  2026-11-03 12:49 ` [PATCH 1/2] KVM: register asynchronous page fault waits with interrupts disabled Paolo Bonzini
  2026-11-03 12:49 ` [PATCH 2/2] x86: KVM: remove the dummy allocation case from async page fault handling Paolo Bonzini
  0 siblings, 2 replies; 5+ messages in thread
From: Paolo Bonzini @ 2026-11-03 12:49 UTC (permalink / raw)
  To: linux-kernel, kvm
  Cc: Sean Christopherson, Hillf Danton, Steven Rostedt, Harry Yoo

Asynchronous page fault handling is supposedly able to detect page
ready notifications that are sent before the waiter is registered,
but this code is broken for PREEMPT_RT because it tries to allocate in
hardirq-disabled context.

This code however is almost dead, because page ready notification will
happen on the same vCPU as the waiter and not until after the waiter
enables interrupts.  Outside guest mode, interrupts are only enabled once
the waiter has registered itself, and this guarantees that an outstanding
(non-spurious) waiter will always be found.  This unfortunately is not
the case for asynchronous page faults that are delivered while in guest
mode, but that can be fixed and the dubious code removed.

Paolo

Paolo Bonzini (2):
  KVM: register asynchronous page fault waits with interrupts disabled
  x86: KVM: remove the dummy allocation case from async page fault
    handling

 arch/x86/include/asm/kvm_host.h |  1 +
 arch/x86/include/asm/kvm_para.h | 20 ++++++-
 arch/x86/kernel/kvm.c           | 97 +++++++++------------------------
 arch/x86/kvm/mmu.h              | 14 +++++
 arch/x86/kvm/mmu/mmu.c          |  4 +-
 arch/x86/kvm/svm/svm.c          |  3 +-
 arch/x86/kvm/vmx/main.c         |  2 +-
 7 files changed, 65 insertions(+), 76 deletions(-)

-- 
2.56.0


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

end of thread, other threads:[~2026-11-03 20:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-03 12:49 [PATCH 0/2] KVM: remove the dummy allocation case from async page fault handling Paolo Bonzini
2026-11-03 12:49 ` [PATCH 1/2] KVM: register asynchronous page fault waits with interrupts disabled Paolo Bonzini
2026-11-03 14:43   ` Sean Christopherson
2026-11-03 20:55     ` Paolo Bonzini
2026-11-03 12:49 ` [PATCH 2/2] x86: KVM: remove the dummy allocation case from async page fault handling Paolo Bonzini

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

all inboxes | Powered by JetHome®