Kernel KVM virtualization development
 help / color / mirror / Atom feed
* [PATCH v5 0/6] KVM: x86: Fix IOAPIC remote_irr and irr_delivered handling
@ 2026-08-12  8:27 Hao Zhang
  2026-08-12  8:32 ` [PATCH v5 1/6] KVM: x86: ioapic: Update remote_irr only after successful delivery Hao Zhang
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Hao Zhang @ 2026-08-12  8:27 UTC (permalink / raw)
  To: seanjc@google.com; +Cc: kvm@vger.kernel.org, pbonzini@redhat.com, Huang, Kai

From: Hao Zhang <zhanghao1@kylinos.cn>

Fix several cases where KVM updates IOAPIC interrupt state incorrectly.

The first fix avoids setting remote_irr when level-triggered interrupt
delivery fails, which can leave the pin blocked waiting for an EOI that
will never arrive.  The remaining fixes clean up irr_delivered handling
for edge-triggered interrupts, which affects the IOAPIC state exposed to
userspace through KVM_GET_IRQCHIP.

Changes in v5:
- Updated patch 1 changelog to explain the Fixes tag history and added
  Kai's Reviewed-by.
- Split selftest changes for the irr_delivered fixes into separate
  patches.
- Dropped the Fixes tag from the duplicate-edge patch, as the exact
  historical commit is unclear.

Hao Zhang (6):
  KVM: x86: ioapic: Update remote_irr only after successful delivery
  KVM: selftests: Verify failed IOAPIC delivery preserves state
  KVM: x86: ioapic: Preserve irr_delivered for duplicate edge interrupts
  KVM: selftests: Verify duplicate edge preserves IOAPIC state
  KVM: x86: ioapic: Clear irr_delivered on level-triggered RTE
  KVM: selftests: Verify edge-to-level clears IOAPIC state

 arch/x86/kvm/ioapic.c                              |  15 +-
 tools/testing/selftests/kvm/Makefile.kvm           |   1 +
 .../testing/selftests/kvm/x86/ioapic_state_test.c  | 190 +++++++++++++++++++++
 3 files changed, 203 insertions(+), 3 deletions(-)
 create mode 100644 tools/testing/selftests/kvm/x86/ioapic_state_test.c


base-commit: c21bb4193868a8de71fc4693fa741e195fdf5d86

-- 
2.15.0


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

end of thread, other threads:[~2026-08-12  8:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-12  8:27 [PATCH v5 0/6] KVM: x86: Fix IOAPIC remote_irr and irr_delivered handling Hao Zhang
2026-08-12  8:32 ` [PATCH v5 1/6] KVM: x86: ioapic: Update remote_irr only after successful delivery Hao Zhang
2026-08-12  8:34 ` [PATCH v5 2/6] KVM: selftests: Verify failed IOAPIC delivery preserves state Hao Zhang
2026-08-12  8:35 ` [PATCH v5 3/6] KVM: x86: ioapic: Preserve irr_delivered for duplicate edge interrupts Hao Zhang
2026-08-12  8:52   ` sashiko-bot
2026-08-12  8:37 ` [PATCH v5 4/6] KVM: selftests: Verify duplicate edge preserves IOAPIC state Hao Zhang
2026-08-12  8:39 ` [PATCH v5 5/6] KVM: x86: ioapic: Clear irr_delivered on level-triggered RTE Hao Zhang
2026-08-12  8:41 ` [PATCH v5 6/6] KVM: selftests: Verify edge-to-level clears IOAPIC state Hao Zhang

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