mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/5] KVM: nVMX: fix nested APICv emulation for windows guests
@ 2026-11-23 17:55 Maxim Levitsky
  2026-11-23 17:55 ` [PATCH v3 1/5] KVM: nVMX: don't check PIR.ON when processing nested posted interrupts Maxim Levitsky
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Maxim Levitsky @ 2026-11-23 17:55 UTC (permalink / raw)
  To: kvm; +Cc: linux-kernel, Paolo Bonzini, x86, Sean Christopherson, Maxim Levitsky

Fix two problems that were recently discovered that cause nested APICv
to malfunction on windows with hyperv enabled.

The first problem is that unlike KVM, windows doesn't set PIR.ON when
sending posted interrupts. X86 spec actually allows this.

The second problem is that unlilke KVM, which mostly ignores them,
windows depends on accurate delivery of the posted notification
interrupts, and currently it is possible for a posted notification
to get lost it it arrives at the same time as the nested VM exit.

V2: to avoid spurious notification in L1, process the posted
notification in L2, just before VM exit.

V3: rework the patch series following the pseudocode that Paolo suggested
(Thanks!!)

Best regards,
	Maxim Levitsky

Maxim Levitsky (5):
  KVM: nVMX: don't check PIR.ON when processing nested posted interrupts
  KVM: x86: split vcpu->arch.hflags into nested_guest_mode and smm_mode
  KVM: x86: convert nested_guest_state into an atomic variable
  KVM: x86: nVMX: move nested APICv state to nested_guest_state
  KVM: x86: nVMX: fix races in delivery of nested posted interrupts

 arch/x86/include/asm/kvm_host.h | 22 +++++++----
 arch/x86/kvm/regs.h             |  9 +++--
 arch/x86/kvm/smm.c              |  8 ++--
 arch/x86/kvm/smm.h              |  2 +-
 arch/x86/kvm/vmx/nested.c       | 67 ++++++++++++++++++++++-----------
 arch/x86/kvm/vmx/vmx.c          | 61 +++++++++++++++---------------
 arch/x86/kvm/vmx/vmx.h          |  2 -
 arch/x86/kvm/x86.c              | 11 +++---
 8 files changed, 107 insertions(+), 75 deletions(-)

-- 
2.56.1



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

end of thread, other threads:[~2026-11-23 17:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23 17:55 [PATCH v3 0/5] KVM: nVMX: fix nested APICv emulation for windows guests Maxim Levitsky
2026-11-23 17:55 ` [PATCH v3 1/5] KVM: nVMX: don't check PIR.ON when processing nested posted interrupts Maxim Levitsky
2026-11-23 17:55 ` [PATCH v3 2/5] KVM: x86: split vcpu->arch.hflags into nested_guest_mode and smm_mode Maxim Levitsky
2026-11-23 17:55 ` [PATCH v3 3/5] KVM: x86: convert nested_guest_state into an atomic variable Maxim Levitsky
2026-11-23 17:55 ` [PATCH v3 4/5] KVM: x86: nVMX: move nested APICv state to nested_guest_state Maxim Levitsky
2026-11-23 17:55 ` [PATCH v3 5/5] KVM: x86: nVMX: fix races in delivery of nested posted interrupts Maxim Levitsky

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®