[tip: irq/drivers] irqchip/gic-v3-its: Order table zeroing before the GIC can see it

From: tip-bot2 for Fuad Tabba

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


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

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

irqchip/gic-v3-its: Order table zeroing before the GIC can see it

The ITS driver allocates the ITS tables and the vPE tables as zeroed
pages. It exposes each table with a single store: a relaxed
GICR_VPROPBASER write with Valid set, the relaxed GITS_CTLR write that
enables the ITS, or a valid level-1 entry for a level-2 page.
However, on a shareable table the zeroing isn't ordered before that
store, so the GIC can read the page's previous contents as table
entries, which the spec makes UNPREDICTABLE (IHI 0069H.b 5.2.1, and
GICR_VPROPBASER.Z in 12.11.39). A level-2 page is exposed at runtime,
when the GIC may already be walking the level-1 table for other IDs.

Add a dsb(ishst) at the end of its_alloc_pages_node(), as
its_flush_cmd() does for a command. The allocator doesn't take a
shareability argument, so the barrier is unconditional. On a
non-shareable table it doesn't hurt.

Signed-off-by: Fuad Tabba <fuad.tabba@xxxxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxx>
Reviewed-by: Zenghui Yu <yuzenghui@xxxxxxxxxx>
Reviewed-by: Marc Zyngier <maz@xxxxxxxxxx>
Link: https://patch.msgid.link/20261130080856.636755-2-fuad.tabba@xxxxxxxxx
---
drivers/irqchip/irq-gic-v3-its.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 3cf94c2..9f45722 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -233,6 +233,9 @@ static struct page *its_alloc_pages_node(int node, gfp_t gfp,
if (ret)
return NULL;

+ /* Order the zeroing before any store that exposes the page to the GIC */
+ dsb(ishst);
+
return page;
}