[tip: irq/drivers] irqchip/gic-v4.1: Clean the vPE table to PoC

From: tip-bot2 for Fuad Tabba

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


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

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

irqchip/gic-v4.1: Clean the vPE table to PoC

On a GICv4.1 system, allocate_vpe_l1_table() sets Z and Valid in
GICR_VPROPBASER and points it at a freshly zeroed vPE table, but leaves
the zeroes in the CPU's cache. A redistributor that accesses the table
as non-shareable reads it from memory, where it might not be zero, and
the spec makes that UNPREDICTABLE (GICR_VPROPBASER.Z, IHI 0069H.b
12.11.39).

Clean the table to PoC unconditionally, as the driver does for the
pending table. Testing rdists_support_shareable() isn't enough, since
GICR_VPROPBASER can read back as non-shareable even when the helper
returns true. allocate_vpe_l2_table() already cleans the level-2 pages
in that case. A vPE table inherited from an ITS is cleaned by
its_setup_baser() when the ITS is non-shareable.

Fixes: 5e5168461c22c ("irqchip/gic-v4.1: VPE table (aka GICR_VPROPBASER) allocation")
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-3-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 9f45722..2137b04 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -3007,6 +3007,9 @@ static int allocate_vpe_l1_table(void)
pa = virt_to_phys(page_address(page));
WARN_ON(!IS_ALIGNED(pa, psz));

+ /* Make sure the GIC will observe the zeroed table */
+ gic_flush_dcache_to_poc(page_address(page), np * PAGE_SIZE);
+
val |= FIELD_PREP(GICR_VPROPBASER_4_1_ADDR, pa >> 12);
if (rdists_support_shareable()) {
val |= GICR_VPROPBASER_RaWb;