aboutsummaryrefslogtreecommitdiff
path: root/hw/intc
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2025-05-12 13:10:14 +1000
committerCédric Le Goater <clg@redhat.com>2025-07-21 08:03:52 +0200
commitd1023a296c8297454fc4b207d58707c0a5e62e0a (patch)
treeb1f1621dd6c280789adaa1e63e71199316d66ba0 /hw/intc
parente8cf73b849879cd93b1d1b5fd3bde79fb42064dc (diff)
downloadqemu-d1023a296c8297454fc4b207d58707c0a5e62e0a.zip
qemu-d1023a296c8297454fc4b207d58707c0a5e62e0a.tar.gz
qemu-d1023a296c8297454fc4b207d58707c0a5e62e0a.tar.bz2
ppc/xive2: fix context push calculation of IPB priority
Pushing a context and loading IPB from NVP is defined to merge ('or') that IPB into the TIMA IPB register. PIPR should therefore be calculated based on the final IPB value, not just the NVP value. Fixes: 9d2b6058c5b ("ppc/xive2: Add grouping level to notification") Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Reviewed-by: Glenn Miles <milesg@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-6-npiggin@gmail.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'hw/intc')
-rw-r--r--hw/intc/xive2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/intc/xive2.c b/hw/intc/xive2.c
index cb75ca8..01cf96a 100644
--- a/hw/intc/xive2.c
+++ b/hw/intc/xive2.c
@@ -835,8 +835,9 @@ static void xive2_tctx_need_resend(Xive2Router *xrtr, XiveTCTX *tctx,
nvp.w2 = xive_set_field32(NVP2_W2_IPB, nvp.w2, 0);
xive2_router_write_nvp(xrtr, nvp_blk, nvp_idx, &nvp, 2);
}
+ /* IPB bits in the backlog are merged with the TIMA IPB bits */
regs[TM_IPB] |= ipb;
- backlog_prio = xive_ipb_to_pipr(ipb);
+ backlog_prio = xive_ipb_to_pipr(regs[TM_IPB]);
backlog_level = 0;
first_group = xive_get_field32(NVP2_W0_PGOFIRST, nvp.w0);