Re: [PATCH v3 04/14] irqchip/gic-v5: Retain the L2 IST when mapping times out
From: Sascha Bischoff
Date: Wed Nov 25 2026 - 09:00:05 EST
Hi Lorenzo,
On 24/11/2026 17:23, Lorenzo Pieralisi wrote:
On Thu, Nov 19, 2026 at 12:00:15PM +0000, Fuad Tabba wrote:
Hi Sascha,
On Wed, 18 Nov 2026 17:35:33 +0000, Sascha Bischoff
<sascha.bischoff@xxxxxxx> wrote:
[...]
diff --git a/drivers/irqchip/irq-gic-v5-irs.c b/drivers/irqchip/irq-gic-v5-irs.c[...]
@@ -217,6 +217,10 @@ int gicv5_irs_iste_alloc(const u32 lpi)
if (FIELD_GET(GICV5_ISTL1E_VALID, le64_to_cpu(l1ist[index])))
return 0;
+ /* A previous map timed out; do not overwrite its pending L1 entry. */
+ if (READ_ONCE(l1ist[index]))
+ return -EBUSY;
Sashiko's review [1] didn't go on the list, in case you missed it.
Sashiko found that l1ist[index] is read twice, and that on a
non-coherent IRS a map completing after the timeout leaves a stale
copy of the L1 entry in the cache for later allocations. Invalidating
the entry before it's first read would fix the latter. Invalidating it
on the timeout path wouldn't, since a later read can refill the line
before the map completes.
With those fixed:
Reviewed-by: Fuad Tabba <fuad.tabba@xxxxxxxxx>
Cheers,
/fuad
[1] https://sashiko.dev/#/patchset/20261118-host_gicv5_fixes-v3-0-13c1859e8aa3%40arm.com
Hi Sascha,
I am taking some time to revamp the current approach because as a fix
it is getting complicated and there are corner cases that I don't think
are fully covered.
Yeah, this is a bit of an awkward one to get right.
I suggest we drop this patch from this series for now so that it does
not hold off the other patches that I believe are ready to be merged
with very minor tweaks.
OK, noted. I've dropped this from the next version, so hopefully the rest can be merged in.
Thanks,
Lorenzo
Thanks,
Sascha