Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795438883; b=G2yQ7JCB2DF0OrBKAvk6dX1/fW6QxeIUl/UzbSGA75TvvqKnA9D85E3kLd8yTYv295IF suXPhjjJBpoGk+E/hiIblTa2WXpaSnMPgrOyLjb7yT2lSAug3btwBfOr+h529RoIYA8LM 3SVczBXq2cVFoiveY1T4fEB/6qkYP76Az0T3lNcexoinQfVg6ec6oZRmfR40r1mt6d7Me JItk8frKFEgMMkfRsQO9V4nNO+uDyvquC1isSg7nJlaI5MN6yTLGjuEAnwkl8Is3c9k3r SpfTEcsFbt/TgCl3s6m7ydPaMtIcO0DYA7otxqLb1btuK5fYOwuKcy199hdYmdnFrXA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795438883; h=Received:DKIM-Signature:Received:Date:Message-ID:From:To:Cc:Subject: In-Reply-To:References:User-Agent:MIME-Version:Content-Type: X-SA-Exim-Connect-IP:X-SA-Exim-Rcpt-To:X-SA-Exim-Mail-From: X-SA-Exim-Scanned; bh=f/CLwrc5waSKUo+/4figVP/7jz8OonesKXu7+E62yJ8=; b=RMHzYYyth7EP2DksQd3Bo1nSc+5YOMOQUcn0BJhZPPQ1Y627kkrDEEKdHnvz9iPWl9FO JFFvbKmdjESV9opon6jVit/KKx+YXTbzLCO5FdLLAdmaZIK29kaTjQ8h+E3jvr9fSQwWj G6Og4LClWQZ8s29lQnKdWeCZ/6N6eUtI+Uj4jgAPlppLKBvHKXIRGwUSEgEXp4Mvjnwnf lj8KTSyWS5tUt3GuJ3F/pBbTIhbMGNMl6Pyf9qAe5So/T3BE1E+1cNYHIV9v6jNiiFMFA dlFOl4z2Et7/23phwE2u6G+mIpH2Hpf50kTcrtC+aGhjOCumHHiTKZSJx5FiiwU5zXQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Lrgz+gK2; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ADBE4606A333 for ; Mon, 23 Nov 2026 13:01:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Lrgz+gK2 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D62371F000E0; Mon, 23 Nov 2026 13:01:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795438882; bh=f/CLwrc5waSKUo+/4figVP/7jz8OonesKXu7+E62yJ8=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=Lrgz+gK28QFkC5sArMrEjtdBx9R3KwdMYv02P7IrD1uL/w4RGnzN0Cbtzt9HkdvOv fh/PzLK6dMVoxGDNyFDtjrw9GbG7unClsKRhVNtWc3CNnzbRhVJ5M0wVImfQnKWMKL RmLvxepPnh4cFz1mQVBRNfDZRq+otywXEM6JsXmKeg/OKBziw2hyKPevrYpd9iUE2I Q4njtfCZdMekRtPdQBSlkaJKxQMtxrvqbV2zje+ynWGFtNBXhQ6qV/aGje0q3EcLQF JLEuyJY0jywiJBuk6FlBNSN2ngzbwiSvoSlu6ceFpwzsOOKEfFoAbsbQ12ydQJ0K43 DTBRrDsIrUlVw== 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 1xVTfd-00000001yqX-0MTk; Mon, 23 Nov 2026 13:01:21 +0000 Date: Mon, 23 Nov 2026 13:01:20 +0000 Message-ID: <86ik1nzopr.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 3/5] irqchip/gic-v3-its: Align sub-page ITTs to 256 bytes In-Reply-To: <20261116192933.3266502-4-fuad.tabba@linux.dev> References: <20261116192933.3266502-1-fuad.tabba@linux.dev> <20261116192933.3266502-4-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-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 (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 On Mon, 16 Nov 2026 19:29:31 +0000, Fuad Tabba wrote: > > Commit e36d4165f0796 ("irqchip/gic-v3-its: Rely on genpool alignment") > dropped the ALIGN() of the ITT address in MAPD, on the premise that the > ITT pool returns 256-byte aligned blocks. However, the pool's minimum > allocation order is get_order(ITS_ITT_ALIGN), which is 0, so its > granule is a single byte. An ITT whose size is not a multiple of 256 > leaves the next device's ITT misaligned. MAPD drops the low bits of its > address, so that device's ITEs land on the previous device's ITT. > QEMU's emulated ITS has 12-byte ITEs, so two devices with 32 vectors > each are enough to hit it. > > Create the pool with a granule of ITS_ITT_ALIGN. > > Fixes: e36d4165f0796 ("irqchip/gic-v3-its: Rely on genpool alignment") > Reviewed-by: Suzuki K Poulose > Signed-off-by: Fuad Tabba > --- > drivers/irqchip/irq-gic-v3-its.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c > index 6932dd0a02c42..5756ffe4ec13e 100644 > --- a/drivers/irqchip/irq-gic-v3-its.c > +++ b/drivers/irqchip/irq-gic-v3-its.c > @@ -5854,7 +5854,7 @@ int __init its_init(struct fwnode_handle *handle, struct rdists *rdists, > bool has_v4_1 = false; > int err; > > - itt_pool = gen_pool_create(get_order(ITS_ITT_ALIGN), -1); > + itt_pool = gen_pool_create(ilog2(ITS_ITT_ALIGN), -1); > if (!itt_pool) > return -ENOMEM; > This one really wants a Cc: stable@vger.kernel.org Thanks, M. -- Without deviation from the norm, progress is not possible.