From: Fuad Tabba <fuad.tabba@linux.dev>
To: Marc Zyngier <maz@kernel.org>, Thomas Gleixner <tglx@kernel.org>
Cc: Radu Rendec <radu@rendec.net>,
Steven Price <steven.price@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Will Deacon <will@kernel.org>, Fuad Tabba <tabba@google.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] irqchip/gic-v3-its: Align sub-page ITTs to 256 bytes
Date: Fri, 6 Nov 2026 09:26:23 +0000 [thread overview]
Message-ID: <20261106092625.3977163-2-fuad.tabba@linux.dev> (raw)
In-Reply-To: <20261106092625.3977163-1-fuad.tabba@linux.dev>
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 one misaligned, MAPD drops the low bits of its address,
and 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")
Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
---
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 282e4bafb084f..5613c52adf88e 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -5849,7 +5849,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;
--
2.47.3
next prev parent reply other threads:[~2026-11-06 9:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 9:26 [PATCH 0/3] irqchip/gic-v3-its: Fix the ITT pool's alignment, zeroing and growth Fuad Tabba
2026-11-06 9:26 ` Fuad Tabba [this message]
2026-11-06 9:49 ` [PATCH 1/3] irqchip/gic-v3-its: Align sub-page ITTs to 256 bytes Suzuki K Poulose
2026-11-06 9:26 ` [PATCH 2/3] irqchip/gic-v3-its: Zero ITTs reused from the ITT pool Fuad Tabba
2026-11-06 9:56 ` Suzuki K Poulose
2026-11-06 9:26 ` [PATCH 3/3] irqchip/gic-v3-its: Free the page when gen_pool_add() fails Fuad Tabba
2026-11-06 9:59 ` Suzuki K Poulose
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=20261106092625.3977163-2-fuad.tabba@linux.dev \
--to=fuad.tabba@linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.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®