[tip: irq/drivers] irqchip/gic-v3-its: Align sub-page ITTs to 256 bytes

From: tip-bot2 for Fuad Tabba

Date: Tue Dec 01 2026 - 15:16:07 EST


The following commit has been merged into the irq/drivers branch of tip:

Commit-ID: fca439d27843e615debab545678b90f4729440c3
Gitweb: https://git.kernel.org/tip/fca439d27843e615debab545678b90f4729440c3
Author: Fuad Tabba <fuad.tabba@xxxxxxxxx>
AuthorDate: Mon, 30 Nov 2026 08:08:54
Committer: Thomas Gleixner <tglx@xxxxxxxxxx>
CommitterDate: Tue, 01 Dec 2026 21:12:23 +01:00

irqchip/gic-v3-its: Align sub-page ITTs to 256 bytes

Commit e36d4165f0796 ("irqchip/gic-v3-its: Rely on genpool alignment")
dropped the ALIGN() of the ITT address in MAPD, on the premise that the
ITT pool returns 256-byte aligned blocks. However, the pool's minimum
allocation order is get_order(ITS_ITT_ALIGN), which is 0, so its
granule is a single byte. An ITT whose size is not a multiple of 256
leaves the next device's ITT misaligned. MAPD drops the low bits of its
address, so that device's ITEs land on the previous device's ITT.
QEMU's emulated ITS has 12-byte ITEs, so two devices with 32 vectors
each are enough to hit it.

Create the pool with a granule of ITS_ITT_ALIGN.

Fixes: e36d4165f0796 ("irqchip/gic-v3-its: Rely on genpool alignment")
Signed-off-by: Fuad Tabba <fuad.tabba@xxxxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxx>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@xxxxxxx>
Reviewed-by: Zenghui Yu <yuzenghui@xxxxxxxxxx>
Reviewed-by: Marc Zyngier <maz@xxxxxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx
Link: https://patch.msgid.link/20261130080856.636755-4-fuad.tabba@xxxxxxxxx
---
drivers/irqchip/irq-gic-v3-its.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 2137b04..5a1544f 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -5854,7 +5854,7 @@ int __init its_init(struct fwnode_handle *handle, struct rdists *rdists,
bool has_v4_1 = false;
int err;

- itt_pool = gen_pool_create(get_order(ITS_ITT_ALIGN), -1);
+ itt_pool = gen_pool_create(ilog2(ITS_ITT_ALIGN), -1);
if (!itt_pool)
return -ENOMEM;