From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.183 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796026155; b=3bM4gRglQknCQWuivD5iNM9WBSRy/pUd07dlTUH/sLbvee2xY6WpjXujdUgL3DL0MU3+ 31IW5xcY7jIL7cg9aMAYAs5iK2yEh2LxDcxWyNtajMwgsxcGqV10PREbjm3Tfvo4i6AIH 2+feQaG4HHTAxnQFO0kZUGn69S9bIdO4tJIDqqZk6qdNbvgJZsb2pppN71KCcJr1W1qgo gTeHEI8sOFDvyA3yvnBcgz8eDkVXOBK3bfTzqPUkTVmB+z/gHtHDtpbil4gO/L1eW0vnl lj29oEgPhKlNMkY7pYnzOICzuMD41MQfmdUtZVFlK+TjdzTCs87Xa18BfIGpIWifUFA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796026155; 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=1Haofz6OCdZDZFmrvUKxqPsz8drj+4BKuAnYZWqcWks=; b=338qcajV9fkVHBAk0MFpcmCL9hKwHoOn7z3mhiuxIU3Blt5mNN0BDy369NvIJNvhTb7B KG/oJpodEhE/MBt0So0fl5hz+OqU1Da/7Llkq+ZeuyAS/Y1pT/85ucjylkX91vRDa2xa7 2uzIJ2LPH39ZAZPALtl+9JTAVOYV6eTeSejBxR+Gu/0U/Qs9zat79Ye36zNmbZ1cwjmHD ukgPXrcNoPc1ujIXb4D6cIChnmgGPCR2YhoOmqbruImnRCDcT0GQqfEfa6+ypx1hqvS+W 5MYG8269nj5iQ+gKJB94xdbEd8FtXHsd5wUd1r8xvZxR6E7ZU5ltAd2IhmUIqVnXcmA== 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="CLtpAyp/"; arc=none smtp.remote-ip=91.218.175.183 Received: from mta0.migadu.com (out-183.mta0.migadu.com [91.218.175.183]) (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 99BF0606A325 for ; Mon, 30 Nov 2026 08:09:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 99BF0606A325 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=CLtpAyp/ X-Envelope-To: stable@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=I/BEUnLpC84XUNVHp3EFzF0vKXG3DENeR6dVNCC+e6A=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796026152; v=1; x=1796630952; b=CLtpAyp/PrlHvz+LXRj/ImHDVLqoJgbTzgWCIKg27n5liZLleWAj1gQntLtd/P8qgKLqTt29 ayPGuK22DUM9p1w9REW4HICkSaXgsu2lGBqqThaJxNRU5Vzzdsqzb107BsvIlh9zAJ2WW0l0/cH CyXTPHeZc4cSLpNLQyhYq6r8= X-Envelope-To: stable@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 37c508204e7ee40e; Mon, 30 Nov 2026 08:09:12 +0000 X-Mizu-Trace-ID: 37c508204e7ee40e 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, stable@vger.kernel.org Subject: [PATCH v4 3/5] irqchip/gic-v3-its: Align sub-page ITTs to 256 bytes Date: Mon, 30 Nov 2026 08:08:54 +0000 Message-ID: <20261130080856.636755-4-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: stable@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 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 Reviewed-by: Zenghui Yu Reviewed-by: Marc Zyngier Cc: stable@vger.kernel.org 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; -- 2.47.3