mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Fuad Tabba <fuad.tabba@linux.dev>
To: maz@kernel.org, tglx@kernel.org
Cc: radu@rendec.net, lpieralisi@kernel.org, steven.price@arm.com,
	suzuki.poulose@arm.com, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, will@kernel.org, tabba@google.com
Subject: [PATCH 3/3] irqchip/gic-v3-its: Clean a non-shareable vPE table to PoC
Date: Fri,  6 Nov 2026 12:02:21 +0000	[thread overview]
Message-ID: <20261106120221.347309-4-fuad.tabba@linux.dev> (raw)
In-Reply-To: <20261106120221.347309-1-fuad.tabba@linux.dev>

On a GICv4.1 redistributor that doesn't support shareability,
allocate_vpe_l1_table() points GICR_VPROPBASER at a freshly zeroed
vPE table with Z and Valid set, but leaves the zeroes in the CPU's
cache. The redistributor reads the table from memory, where it may
not be zero, and the spec makes that UNPREDICTABLE (GICR_VPROPBASER.Z,
IHI 0069H.b 12.11).

Clean the table to PoC when the redistributor is non-shareable, as the
driver does for its other tables.

Fixes: 846297e11e8ae ("irqchip/gic-v3-its: Handle non-coherent GICv4 redistributors")
Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
---
 drivers/irqchip/irq-gic-v3-its.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index badc3843d90ca..5b3273e0dfc79 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -3012,6 +3012,8 @@ static int allocate_vpe_l1_table(void)
 	if (rdists_support_shareable()) {
 		val |= GICR_VPROPBASER_RaWb;
 		val |= GICR_VPROPBASER_InnerShareable;
+	} else {
+		gic_flush_dcache_to_poc(page_address(page), np * PAGE_SIZE);
 	}
 	val |= GICR_VPROPBASER_4_1_Z;
 	val |= GICR_VPROPBASER_4_1_VALID;
-- 
2.47.3


      parent reply	other threads:[~2026-11-06 12:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06 12:02 [PATCH 0/3] irqchip/gic-v3-its: Fix how zeroed table pages reach the GIC Fuad Tabba
2026-11-06 12:02 ` [PATCH 1/3] irqchip/gic-v3-its: Zero ITS pages before sharing them with the host Fuad Tabba
2026-11-06 14:31   ` Suzuki K Poulose
2026-11-06 15:57     ` Fuad Tabba
2026-11-06 12:02 ` [PATCH 2/3] irqchip/gic-v3-its: Order table zeroing before the GIC can see it Fuad Tabba
2026-11-06 12:02 ` Fuad Tabba [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261106120221.347309-4-fuad.tabba@linux.dev \
    --to=fuad.tabba@linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=maz@kernel.org \
    --cc=radu@rendec.net \
    --cc=steven.price@arm.com \
    --cc=suzuki.poulose@arm.com \
    --cc=tabba@google.com \
    --cc=tglx@kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®