From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.178 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796026150; b=2hmv04ScwkYyb2FspAY8Q9d4DZiE6pDIo+whuY2wrj91R1AxRChoHxsQn4cIkO4wXo8S 4Y2HtPANwS4w/Kc3KwTRinz8XzNsa+Wk4zgd0nnp6RlIZdnewKzB/jGEYLH1uZOxcfvx0 bNwNfnhSCplwtI0BVzoCAVIT1DhzSAZx2HGO0AKX+LtM5Da/pktyedXJtMnmLS2953xTZ N6DkyabsULapa9eYZ4Xc3EVujouWvR94NaSvLE0aklYuTO3zbYkXRXQCZRvpeOf/krYsy UGlk8UQAMpq0drXzMf59iPTOydUHqwMYcQdbPPJOQ8KUWwQ8p0TucyJYq6AYjEz0ZAg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796026150; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:From:To:Cc:Subject:Date:Message-ID: X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=XIbxa4z+GUrMTjFnStQSOk7CxQ3c2oEdNhumXWu6+hY=; b=hhdMAb+sMobXusrhqlD+Rqh6mSInDM2QyxRmDMU+Ki6fwfTyiR9iFyaI9243nIzBxH1s /4TFl3CwgqKn0IVNw2yuIY1rvnfR7tyudIv184O2XxSqRtd8Aqe5voBMJCGZ2DZuiqQWv umD+xPuYQoI6BminzwOilIeEOhCtn/0ws5xMrfZyovzUAl0/t+Ku6LIXdn3pcyS2q/dYP zzYZVPumJIUupI2hda41sS9ykUPg5bTJNWXZ+8Ul6qPRaxNdbFCfohpHR8OxDSZG2KgH7 d8dZo/sxg6TD4wQXOQDn6auNz50iYFFGyb23x8BRrzwT+OmWU8pti9iAzwSos6G2rog== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=UJw14yGS; arc=none smtp.remote-ip=91.218.175.178 Received: from mta0.migadu.com (out-178.mta0.migadu.com [91.218.175.178]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D8342606A332 for ; Mon, 30 Nov 2026 08:09:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D8342606A332 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=UJw14yGS X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=t9ZefJ3gUg+nLeVIzpWLPLrU6Br9lghJG9YKL+Wy1D0=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796026148; v=1; x=1796630948; b=UJw14yGS5SJM0VThkvns8GglsgFqIgEs6j1lwoM8zrTe3LGYqyhWbumeikkbSgfONdkW5j9t 0QPfgsLoqMqqaTrNweP2Ywze1zKkhXEOwjD6ww/WH9fyLAL0adA1U9SpF1NPEsaqWwR2liPGzoT Kmr+paeeItXwvFsjkK/aT378= X-Envelope-To: linux-kernel@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id b446326efa27d19d; Mon, 30 Nov 2026 08:09:07 +0000 X-Mizu-Trace-ID: b446326efa27d19d X-Migadu-Flow: FLOW_OUT From: Fuad Tabba To: Marc Zyngier , Thomas Gleixner Cc: Radu Rendec , Zenghui Yu , Lorenzo Pieralisi , Steven Price , Suzuki K Poulose , "Aneesh Kumar K . V" , Will Deacon , Fuad Tabba , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 2/5] irqchip/gic-v4.1: Clean the vPE table to PoC Date: Mon, 30 Nov 2026 08:08:53 +0000 Message-ID: <20261130080856.636755-3-fuad.tabba@linux.dev> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261130080856.636755-1-fuad.tabba@linux.dev> References: <20261130080856.636755-1-fuad.tabba@linux.dev> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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") Reviewed-by: Zenghui Yu Reviewed-by: Marc Zyngier Signed-off-by: Fuad Tabba --- 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 9900c6a53526e..6932dd0a02c42 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; -- 2.47.3