summary refs log tree commit diff stats
path: root/hw/intc/xive.c
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2025-05-12 13:10:51 +1000
committerCédric Le Goater <clg@redhat.com>2025-07-21 08:03:53 +0200
commit565e6d4d2151e856026ee60d16c12a61e667cd15 (patch)
tree19f7bdbbb4c7bc02bfdc4568f3b0d4004adf2b80 /hw/intc/xive.c
parent7a40b50757b55c2d4233c304f32df5afdd1bd63a (diff)
downloadfocaccia-qemu-565e6d4d2151e856026ee60d16c12a61e667cd15.tar.gz
focaccia-qemu-565e6d4d2151e856026ee60d16c12a61e667cd15.zip
ppc/xive: Redistribute phys after pulling of pool context
After pulling the pool context, if a pool irq had been presented and
was cleared in the process, there could be a pending irq in phys that
should be presented. Process the phys irq ring after pulling pool ring
to catch this case and avoid losing irqs.

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-43-npiggin@gmail.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'hw/intc/xive.c')
-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 d609d552e8..50a38bbf2e 100644
--- a/hw/intc/xive.c
+++ b/hw/intc/xive.c
@@ -320,6 +320,9 @@ static uint64_t xive_tm_pull_pool_ctx(XivePresenter *xptr, XiveTCTX *tctx,
 
     xive_tctx_reset_signal(tctx, TM_QW1_OS);
     xive_tctx_reset_signal(tctx, TM_QW2_HV_POOL);
+    /* Re-check phys for interrupts if pool was disabled */
+    xive_tctx_pipr_recompute_from_ipb(tctx, TM_QW3_HV_PHYS);
+
     return qw2w2;
 }