[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH for-4.22 0/2] xen/arm: Fix eSPI IRQ indexing issues


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Mykola Kvach <mykola_kvach@xxxxxxxx>
  • Date: Fri, 10 Jul 2026 11:31:30 +0300
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=njYmxRByqxvj8zB9Sro/i12/XrQGCj0Q7a3fR9R1pDw=; b=yU3onzZHOkv54d2AjdwYQ1UND/T3s+mbEchevDySJ8fFqoISrCqim0GNgvN7uXT3nJLls8+2NWtMMY2YE95rJw3hLQeeeySZTckR5zU3Uoqm83CDa8qg02xPLqw6VqX0qIkn9lW5oxWr0LNRYuYcBSVPcUxz0Yx2zUmgz8/di/HhIpDICQj0Vyb0TpiRH2t6zWKQU2qPMYtODZcxGUcO5KetFPCdVhxV2T3a3BqAO/KvEEBaHFuGcpeFfbWsoD0QjLYcq2ODf+DiU8/jXA7Ijbt471NJ4LLNEQO3NkrppL5z75KinLGYu5zrJr68XIIau8uJwZ4YdgRlTgbnhzMCdQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wMpE6MFBzo97MT+aUuYgsLUghr+M9Y9yXp1/n4D2TwCzu9GW2/yCldNFNkfqGBFTVENj3HpV0Kr0Mrfo0qjmLQ5mBmIkrmEI0RXubPOIcjTYJ1qJJL68z6ZQaa2QouosijE2/fgfhWt75TlqIm+VDybbAmOKxOGDeNziPbJ6diXZW5LEhglRLanulmCiWt+b5K0fmGmS80DHReEh1s3FJ7VJGYaqW7jd5x0gWLPZmD/VE6VyQp80usEgX+z2hO6Ns2dO7h5Q4E0+/oSK3uzy+FkFRcdkhSwVtbUspwq3j3TtC6ffJDWVYycS7W+t6sM2EYvAozXUmTNjdHn/MD2bxA==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=epam.com header.i="@epam.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Fri, 10 Jul 2026 08:31:56 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

This small series fixes two eSPI-related indexing issues in the Arm
interrupt and classic vGIC paths.

With GICv3 eSPI support enabled, Xen exposes a sparse architectural
INTID namespace: regular SPIs occupy the traditional range, while eSPIs
start at INTID 4096. Some paths were still treating that namespace as if
it mapped directly to dense internal arrays or bitmaps.

Patch 1 prevents sparse INTIDs in the gap between regular SPIs and eSPIs
from reaching irq_to_desc() and being used as dense irq_desc[] indices.

Patch 2 fixes classic vGIC eSPI allocation bookkeeping: reserve used the
compressed allocation bitmap index for eSPIs, while free still used the
raw virtual INTID.

Both patches are intentionally small and keep the existing eSPI mapping
model.

Tested with:
- CONFIG_GICV3_ESPI=y build
- CONFIG_GICV3_ESPI=n build
- FVP boot with 64 eSPIs
- pre-fix reproduction using a fake DT interrupt for INTID 3000
- post-fix smoke boot to Linux dom0

Mykola Kvach (2):
  xen/arm: validate IRQs before descriptor lookup
  xen/arm: vgic: free eSPIs using the bitmap index

 xen/arch/arm/gic.c  |  2 --
 xen/arch/arm/irq.c  |  9 +++++++--
 xen/arch/arm/vgic.c | 27 ++++++++++++++++-----------
 3 files changed, 23 insertions(+), 15 deletions(-)

-- 
2.43.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.