[PATCH] irqchip/gic-v3-its: Size the collection table for all possible CPUs

From: Jinjie Ruan

Date: Sun Nov 15 2026 - 21:24:08 EST


The ITS collection table is sized from the hardware default described by
GITS_BASER: a single ITS page holding entry-size objects. With the usual
16-byte collection entry and a 4K ITS page that is 256 collections.

its_cpu_init_collections() installs one collection per CPU using MAPC with
the CPU number as the collection ID, so on a system with more than 256
possible CPUs the MAPC commands for the remaining CPUs fail with
E_ITS_MAPC_COLLECTION_OOR (0x010903) and their redistributors end up
without a valid collection. LPIs targeted at those CPUs, which is where
managed MSI/MSI-X affinity places a large part of the device interrupts,
are then dropped by the hardware: the DMA completes but the completion
interrupt never arrives, so drivers fall back to polling and time out.

On a 384-CPU HiSilicon HIP12 system running v7.4-rc2 every ITS reported

ITS@0x488000000: allocated 256 Interrupt Collections (flat, esz 16, psz 4K, shr 1)

and all four NVMe controllers logged repeated

nvme nvme0: I/O tag 256 (1100) QID 182 timeout, completion polled

while the hinic driver failed to probe with -EIO. With the table sized
for num_possible_cpus() it holds 512 entries and both symptoms are gone.

Handle GITS_BASER_TYPE_COLLECTION in its_alloc_tables() the same way as
the device and VCPU tables, requesting order_base_2(num_possible_cpus())
IDs.

Fixes: 1ac19ca6bf97 ("irqchip: GICv3: ITS: tables allocators")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Jinjie Ruan <ruanjinjie@xxxxxxxxxx>
---
drivers/irqchip/irq-gic-v3-its.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index c952c069f937..319b6edefd37 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -2716,6 +2716,21 @@ static int its_alloc_tables(struct its_node *its)
indirect = its_parse_indirect_baser(its, baser, &order,
ITS_MAX_VPEID_BITS);
break;
+
+ case GITS_BASER_TYPE_COLLECTION:
+ /*
+ * Size the collection table for every possible CPU.
+ * One collection per CPU is installed via MAPC with
+ * col_id == cpu, so a table sized only for the
+ * hardware default page (e.g. 256 entries with
+ * esz 16 / psz 4K) is too small on systems with more
+ * CPUs than that: MAPC for the remaining CPUs fails
+ * with E_ITS_MAPC_COLLECTION_OOR and LPIs targeted at
+ * those CPUs are never delivered.
+ */
+ indirect = its_parse_indirect_baser(its, baser, &order,
+ order_base_2(num_possible_cpus()));
+ break;
}

err = its_setup_baser(its, baser, cache, shr, order, indirect);
--
2.34.1