mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
ppc/xive2: Redistribute group interrupt preempted by higher priority interrupt
A group interrupt that gets preempted by a higher priority interrupt delivery must be redistributed otherwise it would get lost. 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-30-npiggin@gmail.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
committed by
Cédric Le Goater
parent
1319cb8997
commit
cc15d50b6e
+12
-2
@@ -1638,11 +1638,21 @@ static void xive2_router_end_notify(Xive2Router *xrtr, uint8_t end_blk,
|
||||
crowd, cam_ignore, priority,
|
||||
xive_get_field32(END2_W7_F1_LOG_SERVER_ID, end.w7),
|
||||
&match)) {
|
||||
XiveTCTX *tctx = match.tctx;
|
||||
uint8_t ring = match.ring;
|
||||
uint8_t alt_ring = (ring == TM_QW2_HV_POOL) ? TM_QW3_HV_PHYS : ring;
|
||||
uint8_t *aregs = &tctx->regs[alt_ring];
|
||||
uint8_t nsr = aregs[TM_NSR];
|
||||
uint8_t group_level;
|
||||
|
||||
if (priority < aregs[TM_PIPR] &&
|
||||
xive_nsr_indicates_group_exception(alt_ring, nsr)) {
|
||||
xive2_redistribute(xrtr, tctx, alt_ring);
|
||||
}
|
||||
|
||||
group_level = xive_get_group_level(crowd, cam_ignore, nvx_blk, nvx_idx);
|
||||
trace_xive_presenter_notify(nvx_blk, nvx_idx, match.ring, group_level);
|
||||
xive_tctx_pipr_update(match.tctx, match.ring, priority, group_level);
|
||||
trace_xive_presenter_notify(nvx_blk, nvx_idx, ring, group_level);
|
||||
xive_tctx_pipr_update(tctx, ring, priority, group_level);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user