[PATCH v2 00/10] irqchip/gic-v5: Fix misc IRS and ITS host driver issues

Sascha Bischoff sascha.bischoff at arm.com
Wed Nov 18 06:58:59 PST 2026


Hi Fuad,

On 16/11/2026 14:06, Lorenzo Pieralisi wrote:
> On Mon, Nov 16, 2026 at 01:28:56PM +0000, Fuad Tabba wrote:
>> Hi Lorenzo,
>>
>> On Mon, 16 Nov 2026 12:14:50 +0000, Lorenzo Pieralisi
>> <lpieralisi at kernel.org> wrote:
>> [...]
>>>> invalidate have the same shape. The question is, can an IRS miss the
>>>> poll, or is a timeout here only ever a dead IRS?
>>>
>>> Thank you for your patches Fuad.

Seconded. Thanks a lot.

I'm more than happy to include "irqchip/gic-v5: Clean a level 2 device 
table before making it valid" in v3!

>>>
>>> The latter, though freeing memory on timeout wasn't a good idea given
>>> that there is no way to cancel the respective, pending, mapping.
>>
>> Thanks, that answers it. If you'd like a patch that doesn't free the
>> memory on a timeout, let me know and I'll send one.
> 
> Thanks. Again, if that timeout expires I think we have more serious
> problems than the IST mapping but I do agree that freeing memory
> is not the answer; not urgent - please send a patch given that
> you spotted it, can obviously do it too.

I've got some patches addressing the ITT and IST mapping issues in the 
host driver, which I can include in v3 if you haven't already started 
working on these. I'll make sure to include the appropriate Reported-by 
tags, of course!

I'll post a fix for the VMT separately as it doesn't belong in this series.

> 
>>
>> [...]
>>>> Notes:
>>>>      Setting L1 on every invalidation turns each registration and
>>>>      teardown into a range invalidate, both rare paths, and keeps the
>>>>      function simple. Setting it only when registration allocates the
>>>>      level 2 table would miss a registration that fails after the
>>>>      allocation, which leaves the level 1 DTE valid.
>>>
>>> I can't follow. I agree that we have to invalidate the L1 DTE on
>>> L2 allocation but that's a one-off, I don't understand what issues
>>> you are pointing out in the Notes above, if you can point out please
>>> the code paths it refers to that'd help.
>>
>> gicv5_its_device_register() can fail after
>> gicv5_its_devtab_get_dte_ref() has made the L1 DTE valid, and before
>> the gicv5_its_device_cache_inv() at the end. That happens if the
>> EventID bits check fails, or the ITT allocation does. The L1 DTE is
>> then already valid for the next device registered under it, so that
>> registration doesn't allocate a level 2 table.
>>
>> The patch Notes were about setting ITS_INV_DEVICER.L1 in that
>> gicv5_its_device_cache_inv() call only when the registration allocated
>> the table. In that case the failed registration never reaches that
>> call and the next one reaches it with L1 clear, so this L1 DTE is
>> never invalidated. Invalidating in gicv5_its_alloc_l2_devtab(), right
>> after the L1 DTE write, is the one-off you describe. I'll rework the
>> patch to do that instead.
> 
> Yes, I think that's what we should do - invalidating in
> gicv5_its_alloc_l2_devtab() once for all and leave everything else as-is
> matches architecture guidelines.

Agreed. I've got a reworked fix for this too, which I can include in v3.

> 
> Thanks again.
> 
> Lorenzo

Thanks,
Sascha



More information about the linux-arm-kernel mailing list