[PATCH v4 00/13] irqchip/gic-v5: Fix misc IRS and ITS host driver issues
From: Sascha Bischoff
Date: Wed Nov 25 2026 - 09:40:50 EST
This series fixes issues in the GICv5 host IRS and ITS drivers.
The ITS invalidation serialisation fix addresses Sashiko's report of a
race between event and device invalidation commands [1]. The other
patches fix IRS allocation and routing, ITS table selection and cache
maintenance, ACPI coherency handling, and resource cleanup. The IRS
synchronisation change prepares for upcoming KVM callers.
Since v2, Fuad reported missing cache maintenance and L1 invalidation
when allocating an L2 device table, as well as unsafe table cleanup
after a hardware timeout [2]. This revision includes his L2
device-table cache-clean patch and fixes for L1 invalidation and the
host ITS timeout paths. The L2 IST timeout patch is deferred at
Lorenzo's request while he reworks the approach.
The IRS changes:
* Reject allocation of an SPI without a backing IRS and warn about
broken firmware.
* Only program IRS_PE_CR0.DPS when 1-of-N routing is supported.
* Serialise synchronisation requests and their completion polls in
preparation for upcoming KVM callers.
The ITS changes:
* Serialise event and device cache invalidations, which share the
DIDR register.
* Select linear device and interrupt translation tables when one L2
table covers the full ID space.
* Honour the ACPI noncoherent flag.
* Use firmware-node names in initialisation warnings.
* Invalidate the device cache before freeing an ITT.
* Correct cache-maintenance sizing after limiting the DeviceID width.
* Release the reserved MMIO region if DT-based ITS initialisation
fails.
* Retain the ITT if device invalidation times out during registration
or teardown.
* Clean a new L2 device table before publishing its valid L1 DTE.
* Invalidate the L1 DTE immediately after publishing the L2 device
table, including when device registration subsequently fails.
The ITS invalidation serialisation fix, ITS table-selection fix, ACPI
coherency fix, device-table cache-maintenance fixes and L1 DTE
invalidation fix carry Cc: stable trailers for backporting.
The series is based on v7.4-rc4. Thanks to Lorenzo for the review and
to Fuad for the additional reports and cache-clean patch.
Sascha
[1] https://sashiko.dev/#/patchset/20261016155741.979985-1-sascha.bischoff@xxxxxxx?part=11
[2] https://lore.kernel.org/r/20261112145814.853424-1-fuad.tabba@xxxxxxxxx
Signed-off-by: Sascha Bischoff <sascha.bischoff@xxxxxxx>
---
Changes in v4:
- Rebased onto v7.4-rc4.
- Dropped the L2 IST timeout patch at Lorenzo's request while he
reworks the approach.
- Clarified that IRS synchronisation serialisation prepares for
upcoming KVM callers; removed its Fixes and Cc: stable tags.
- Collected Reviewed-by and Acked-by tags.
- Use FW_BUG for unimplemented SPI warnings.
- Mark retained ITTs, including L2 pointer arrays, with kmemleak_not_leak().
- Return early on device teardown invalidation failure.
- Inline L1 DTE invalidation and explain the effective EVENTID_BITS.
- Link to v3: https://patch.msgid.link/20261118-host_gicv5_fixes-v3-0-13c1859e8aa3@xxxxxxx
Changes in v3:
- Rebased onto v7.4-rc3.
- Added Fuad's patch to clean an L2 device table before publishing it.
- Retain the L2 IST and its L1 entry on a mapping timeout, and reject
subsequent allocation attempts that would overwrite a pending mapping.
- Retain ITTs when device invalidation times out during registration
or teardown.
- Added L1 DTE invalidation immediately after publishing an L2 device
table, keeping single-device invalidations for registration and teardown.
- Reworded the IRS synchronisation and ITS invalidation commit messages
to describe the host issues without relying on future KVM support.
- Collected Acked-by tags and reordered commit trailers as requested.
- Link to v2: https://patch.msgid.link/20261104-host_gicv5_fixes-v2-0-e47ad20ea3c8@xxxxxxx
Changes in v2:
- Explained why IRS synchronisation uses a raw spinlock in the KVM
affinity path.
- Clarified the ITS invalidation race and described the KVM forwarding
path.
- Reworked to calculate the device-table size after capping the
DeviceID width.
- Reordered local declarations in the ITS probe function to be in
reverse fir tree order.
- Added Acked-by tags.
- Link to v1: https://patch.msgid.link/20261102-host_gicv5_fixes-v1-0-743b61626fc5@xxxxxxx
---
Fuad Tabba (1):
irqchip/gic-v5: Clean a level 2 device table before making it valid
Sascha Bischoff (12):
irqchip/gic-v5: Reject SPIs not backed by an IRS
irqchip/gic-v5: Only set IRS DPS when 1ofN routing is supported
irqchip/gic-v5: Serialise IRS synchronisation requests
irqchip/gic-v5: Serialise ITS invalidation commands
irqchip/gic-v5: Use linear DT and ITT when L2 covers all IDs
irqchip/gic-v5: Honour ACPI ITS noncoherent flag
irqchip/gic-v5: Use firmware node name in ITS warning
irqchip/gic-v5: Invalidate ITS device cache before freeing ITT
irqchip/gic-v5: Clean the allocated linear device table size
irqchip/gic-v5: Release ITS MMIO region on DT probe failure
irqchip/gic-v5: Retain the ITT when device invalidation times out
irqchip/gic-v5: Invalidate the L1 DTE when allocating an L2 device table
drivers/irqchip/irq-gic-v5-irs.c | 22 +++++++---
drivers/irqchip/irq-gic-v5-its.c | 87 +++++++++++++++++++++++++++++++-------
drivers/irqchip/irq-gic-v5.c | 9 ++++
include/linux/irqchip/arm-gic-v5.h | 1 +
4 files changed, 97 insertions(+), 22 deletions(-)
---
base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f
change-id: 20261102-host_gicv5_fixes-1eeea29d2ea4
Best regards,
--
Sascha Bischoff <sascha.bischoff@xxxxxxx>