From: Zenghui Yu <yuzenghui@huawei.com>
To: Fuad Tabba <fuad.tabba@linux.dev>
Cc: Marc Zyngier <maz@kernel.org>, Thomas Gleixner <tglx@kernel.org>,
Radu Rendec <radu@rendec.net>,
Lorenzo Pieralisi <lpieralisi@kernel.org>,
Steven Price <steven.price@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
"Aneesh Kumar K . V" <aneesh.kumar@kernel.org>,
Will Deacon <will@kernel.org>, Fuad Tabba <tabba@google.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/5] irqchip/gic-v3-its: Clean the GICv4.1 vPE table to PoC
Date: Mon, 23 Nov 2026 17:17:07 +0800 [thread overview]
Message-ID: <a8d84ea8-c095-e444-dea2-23b92866f970@huawei.com> (raw)
In-Reply-To: <20261116192933.3266502-3-fuad.tabba@linux.dev>
Hi Fuad,
Thanks for Cc'ing me on the GIC stuff. I'm happy to read them ;-)
On 2026/11/17 3:29, Fuad Tabba wrote:
> 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@linux.dev>
> ---
> 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;
Nitpick: would "irqchip/gic-v4.1:" be a better prefix for this patch?
Otherwise looks good,
Reviewed-by: Zenghui Yu <yuzenghui@huawei.com>
Thanks,
Zenghui
next prev parent reply other threads:[~2026-11-23 9:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 19:29 [PATCH v2 0/5] irqchip/gic-v3-its: Fixes to table allocation and the ITT pool Fuad Tabba
2026-11-16 19:29 ` [PATCH v2 1/5] irqchip/gic-v3-its: Order table zeroing before the GIC can see it Fuad Tabba
2026-11-16 19:29 ` [PATCH v2 2/5] irqchip/gic-v3-its: Clean the GICv4.1 vPE table to PoC Fuad Tabba
2026-11-23 9:17 ` Zenghui Yu [this message]
2026-11-16 19:29 ` [PATCH v2 3/5] irqchip/gic-v3-its: Align sub-page ITTs to 256 bytes Fuad Tabba
2026-11-16 19:29 ` [PATCH v2 4/5] irqchip/gic-v3-its: Zero ITTs reused from the ITT pool Fuad Tabba
2026-11-16 19:29 ` [PATCH v2 5/5] irqchip/gic-v3-its: Free the page when gen_pool_add() fails Fuad Tabba
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=a8d84ea8-c095-e444-dea2-23b92866f970@huawei.com \
--to=yuzenghui@huawei.com \
--cc=aneesh.kumar@kernel.org \
--cc=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®