From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E29F3606A31A for ; Mon, 23 Nov 2026 13:01:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=bjo0nt3L; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=lZaajkeL DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=VgITBY6EwF9OFHR1C0hfN30+VILA9ZQQQVdvEbJozUU=; b=bjo0nt3LkUS1y53XruzSPWxjDP lLP/oHFG69QLisOP+Dkc+Iq1GF4j0OsMoGucn3eRdOdGMc4T+d/5sNHzz5llFdNNZUuYJLr59dq0p y21GHGyUYcW4/cGYrs7kpUR3SHeje/C//+ZEl7UdZi8En54Blc6UIAon28JIk3OW741GLSUxNp545 lkDmhlxgAtCZRUBVfw0b0UiQ0TuhUkVZDahRs7Z0rwx3gcO+zCyaWBVFVSpoR5u40jTIV4J6tNagP AtFvUsA9HaEtoXzuRylYYO+NBJ7M50MM0Ty5H7mYrBG/gN+TUJjibJuoKjlbrowleex1DRlMoQR+7 gnCS4C4Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xVTfT-00000003Uvd-31b8; Mon, 23 Nov 2026 13:01:11 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xVTfT-00000003Uv2-05iS for linux-arm-kernel@lists.infradead.org; Mon, 23 Nov 2026 13:01:11 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 731A044DA4; Mon, 23 Nov 2026 13:01:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D78451F000C6; Mon, 23 Nov 2026 13:01:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795438869; bh=VgITBY6EwF9OFHR1C0hfN30+VILA9ZQQQVdvEbJozUU=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=lZaajkeLjXmQo8y/X9KOfWsmXDd51xl+hEF69z+EhaEIB3WEscwK+yG1sPsXX8nQe GQscynCIQxNUrg5TiIiXW4xjlVErbLyAzl77LmVoKfJm/Pa20Gsq2flAGojqGZqqwm fmodlYuc9heERz/MDMV4bPWh2bQGALKwefNzwAIyFdD5viJBo3U2X+VG8dp+FhSEm6 fzxUXO+DZVpCOKYxtQMoIP5YYpktpb10hqtdgqm0OyEtiEs8f8mGHVFaGtoq6UoBPf 5JXC8YCLiv9Le2ZrnIPu7TUlP6qyYnRm1ZknMHc+5OnkXln5ndWmJpD8nRXe5CyLTs HuEKuoQLchIQQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xVTfP-00000001ypv-3LZO; Mon, 23 Nov 2026 13:01:07 +0000 Date: Mon, 23 Nov 2026 13:01:07 +0000 Message-ID: <86jym3zoq4.wl-maz@kernel.org> From: Marc Zyngier To: Fuad Tabba Cc: Thomas Gleixner , 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: Re: [PATCH v2 4/5] irqchip/gic-v3-its: Zero ITTs reused from the ITT pool In-Reply-To: <20261116192933.3266502-5-fuad.tabba@linux.dev> References: <20261116192933.3266502-1-fuad.tabba@linux.dev> <20261116192933.3266502-5-fuad.tabba@linux.dev> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) X-Archived-By: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: fuad.tabba@linux.dev, tglx@kernel.org, radu@rendec.net, yuzenghui@huawei.com, lpieralisi@kernel.org, steven.price@arm.com, suzuki.poulose@arm.com, aneesh.kumar@kernel.org, will@kernel.org, tabba@google.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-15.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Mon, 16 Nov 2026 19:29:32 +0000, Fuad Tabba wrote: > > Commit b08e2f42e86b5 ("irqchip/gic-v3-its: Share ITS tables with a > non-trusted hypervisor") moved sub-page ITTs from kzalloc_node() to a > genpool. The pages added to the pool are zeroed, but an ITT freed back > to it goes to the next device as the previous one left it. MAPD is then > UNPREDICTABLE: "When V == 1, the specified ITT does not contain all > zeros" (IHI 0069H.b, 5.3.10). > > Zero every ITT that comes from the pool. > > Fixes: b08e2f42e86b5 ("irqchip/gic-v3-its: Share ITS tables with a non-trusted hypervisor") > Reviewed-by: Suzuki K Poulose > Signed-off-by: Fuad Tabba > --- > drivers/irqchip/irq-gic-v3-its.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c > index 5756ffe4ec13e..33aa8a355ec65 100644 > --- a/drivers/irqchip/irq-gic-v3-its.c > +++ b/drivers/irqchip/irq-gic-v3-its.c > @@ -270,8 +270,10 @@ static void *itt_alloc_pool(int node, int size) > > do { > addr = gen_pool_alloc(itt_pool, size); > - if (addr) > + if (addr) { > + memset((void *)addr, 0, size); > break; > + } > > page = its_alloc_pages_node(node, GFP_KERNEL | __GFP_ZERO, 0); > if (!page) If we are going to zero every ITT that is dished out to the driver, then there is no point in asking for the page to be zeroed the first place, is it? Thanks, M. -- Without deviation from the norm, progress is not possible.