aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2025-05-12 13:10:50 +1000
committerCédric Le Goater <clg@redhat.com>2025-07-21 08:03:53 +0200
commit7a40b50757b55c2d4233c304f32df5afdd1bd63a (patch)
treedb41123c2bb5a69bc2a3a1d36f0a551b1d5f75d5
parent365e322cfb86b2e7131c3290c3a61f8d2bb224d3 (diff)
downloadqemu-7a40b50757b55c2d4233c304f32df5afdd1bd63a.zip
qemu-7a40b50757b55c2d4233c304f32df5afdd1bd63a.tar.gz
qemu-7a40b50757b55c2d4233c304f32df5afdd1bd63a.tar.bz2
ppc/xive2: Prevent pulling of pool context losing phys interrupt
When the pool context is pulled, the shared pool/phys signal is reset, which loses the qemu irq if a phys interrupt was presented. Only reset the signal if a poll irq was presented. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Reviewed-by: Glenn Miles <milesg@linux.ibm.com> Reviewed-by: Michael Kowal <kowal@linux.ibm.com> Tested-by: Gautam Menghani <gautam@linux.ibm.com> Link: https://lore.kernel.org/qemu-devel/20250512031100.439842-42-npiggin@gmail.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
-rw-r--r--hw/intc/xive2.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/hw/intc/xive2.c b/hw/intc/xive2.c
index 7631d48..1123974 100644
--- a/hw/intc/xive2.c
+++ b/hw/intc/xive2.c
@@ -727,20 +727,22 @@ static uint64_t xive2_tm_pull_ctx(XivePresenter *xptr, XiveTCTX *tctx,
xive2_redistribute(xrtr, tctx, cur_ring);
}
}
+
+ /*
+ * Lower external interrupt line of requested ring and below except for
+ * USER, which doesn't exist.
+ */
+ if (xive_nsr_indicates_exception(cur_ring, nsr)) {
+ if (cur_ring == xive_nsr_exception_ring(cur_ring, nsr)) {
+ xive_tctx_reset_signal(tctx, cur_ring);
+ }
+ }
}
if (xive2_router_get_config(xrtr) & XIVE2_VP_SAVE_RESTORE && do_save) {
xive2_tctx_save_ctx(xrtr, tctx, ring, nvp_blk, nvp_idx);
}
- /*
- * Lower external interrupt line of requested ring and below except for
- * USER, which doesn't exist.
- */
- for (cur_ring = TM_QW1_OS; cur_ring <= ring;
- cur_ring += XIVE_TM_RING_SIZE) {
- xive_tctx_reset_signal(tctx, cur_ring);
- }
return target_ringw2;
}