[PATCH v3 04/14] irqchip/gic-v5: Retain the L2 IST when mapping times out

Sascha Bischoff sascha.bischoff at arm.com
Wed Nov 25 06:00:38 PST 2026


Hi Fuad,

On 19/11/2026 12:00, Fuad Tabba wrote:
> Hi Sascha,
> 
> On Wed, 18 Nov 2026 17:35:33 +0000, Sascha Bischoff
> <sascha.bischoff at arm.com> 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.

FWIW, I had missed this. Thanks for calling it out.

> 
> With those fixed:
> Reviewed-by: Fuad Tabba <fuad.tabba at linux.dev>
> 
> Cheers,
> /fuad
> 
> [1] https://sashiko.dev/#/patchset/20261118-host_gicv5_fixes-v3-0-13c1859e8aa3%40arm.com

Thanks,
Sascha



More information about the linux-arm-kernel mailing list