aboutsummaryrefslogtreecommitdiff
path: root/hw/intc
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2025-05-12 13:10:22 +1000
committerCédric Le Goater <clg@redhat.com>2025-07-21 08:03:52 +0200
commit14bcc5239f4d4780ec52881779161c62c46e7243 (patch)
tree5cfde2de03d4e367ae06fb91bf0d166d9628b00f /hw/intc
parentad9175f8a2d7b4ef7d63e9663a42e7f7a44bc3f5 (diff)
downloadqemu-14bcc5239f4d4780ec52881779161c62c46e7243.zip
qemu-14bcc5239f4d4780ec52881779161c62c46e7243.tar.gz
qemu-14bcc5239f4d4780ec52881779161c62c46e7243.tar.bz2
ppc/xive: tctx_notify should clear the precluded interrupt
If CPPR is lowered to preclude the pending interrupt, NSR should be cleared and the qemu_irq should be lowered. This avoids some cases of supurious interrupts. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Reviewed-by: Glenn Miles <milesg@linux.ibm.com> Reviewed-by: Michael Kowal <kowal@linux.ibm.com> Reviewed-by: Caleb Schlossin <calebs@linux.ibm.com> Tested-by: Gautam Menghani <gautam@linux.ibm.com> Link: https://lore.kernel.org/qemu-devel/20250512031100.439842-14-npiggin@gmail.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'hw/intc')
-rw-r--r--hw/intc/xive.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/intc/xive.c b/hw/intc/xive.c
index bc829be..a0a60a2 100644
--- a/hw/intc/xive.c
+++ b/hw/intc/xive.c
@@ -110,6 +110,9 @@ void xive_tctx_notify(XiveTCTX *tctx, uint8_t ring, uint8_t group_level)
regs[TM_IPB], alt_regs[TM_PIPR],
alt_regs[TM_CPPR], alt_regs[TM_NSR]);
qemu_irq_raise(xive_tctx_output(tctx, ring));
+ } else {
+ alt_regs[TM_NSR] = 0;
+ qemu_irq_lower(xive_tctx_output(tctx, ring));
}
}