From: Nicholas Piggin Date: Mon, 12 May 2025 03:10:20 +0000 (+1000) Subject: ppc/xive2: Do not present group interrupt on OS-push if precluded by CPPR X-Git-Tag: v10.1.0-rc0~2^2~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3abbec04e627396c32f2b7b7461961fb68c5c122;p=thirdparty%2Fqemu.git ppc/xive2: Do not present group interrupt on OS-push if precluded by CPPR Group interrupts should not be taken from the backlog and presented if they are precluded by CPPR. Fixes: 855434b3b8 ("ppc/xive2: Process group backlog when pushing an OS context") Signed-off-by: Nicholas Piggin Reviewed-by: Glenn Miles Reviewed-by: Michael Kowal Reviewed-by: Caleb Schlossin Tested-by: Gautam Menghani Link: https://lore.kernel.org/qemu-devel/20250512031100.439842-12-npiggin@gmail.com Signed-off-by: Cédric Le Goater --- diff --git a/hw/intc/xive2.c b/hw/intc/xive2.c index c23933f8f5..181d1ae5f9 100644 --- a/hw/intc/xive2.c +++ b/hw/intc/xive2.c @@ -845,7 +845,9 @@ static void xive2_tctx_need_resend(Xive2Router *xrtr, XiveTCTX *tctx, group_prio = xive2_presenter_backlog_scan(xptr, nvp_blk, nvp_idx, first_group, &group_level); regs[TM_LSMFB] = group_prio; - if (regs[TM_LGS] && group_prio < backlog_prio) { + if (regs[TM_LGS] && group_prio < backlog_prio && + group_prio < regs[TM_CPPR]) { + /* VP can take a group interrupt */ xive2_presenter_backlog_decr(xptr, nvp_blk, nvp_idx, group_prio, group_level);