All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/10] Introduce eSPI support
@ 2025-08-07 12:33 Leonid Komarianskyi
  2025-08-07 12:33 ` [PATCH v2 01/10] xen/arm: gicv3: refactor obtaining GIC addresses for common operations Leonid Komarianskyi
  2025-08-24 17:21 ` [PATCH v2 00/10] Introduce eSPI support Oleksandr Tyshchenko
  0 siblings, 2 replies; 55+ messages in thread
From: Leonid Komarianskyi @ 2025-08-07 12:33 UTC (permalink / raw)
  To: xen-devel@lists.xenproject.org
  Cc: Leonid Komarianskyi, Stefano Stabellini, Julien Grall,
	Bertrand Marquis, Michal Orzel, Volodymyr Babchuk, Andrew Cooper,
	Anthony PERARD, Jan Beulich, Roger Pau Monné

Hello everyone!

### Background
Unlike the Linux kernel, which has supported extended shared peripheral
interrupts (eSPIs) since 2019 [1], Xen currently lacks support for this
interrupt range. For SoCs with GICv3.1+, this feature may be essential
because critical devices, such as consoles required for booting Xen
itself, may rely on eSPIs. Additionally, these platforms require eSPI
support for fully functional domains, as any device using eSPIs cannot
currently be used with Xen setups. Without eSPI support, Xen cannot run
properly on these platforms, significantly limiting its usability on
modern ARM hardware.

This patch series adds support for the extended shared peripheral
interrupt (eSPI) range (INTIDs 4096-5119 [2](ranges of INTIDs)) for Xen
and guest domains. The implementation uses a generic approach to handle
eSPIs, similar to regular SPIs, while maintaining compatibility with the
existing SPI range. Functionality remains unchanged for setups that do
not require eSPIs.

The series includes:
1) General refactoring of common IRQ operations with GIC registers to
improve code readability, simplify further maintenance and prepare the
key functions for eSPI implementation.
2) Introducing a new Kconfig option (default y) to enable or disable
eSPI support. Disabling this option prevents unnecessary resource
allocation for setups that do not require eSPIs.
3) Adding additional resources to store required information and operate
with up to 1024 interrupts from eSPI range.
4) Adjusting assertions and checks to pass verification for INTIDs in
the eSPI range.
5) Configuration of eSPI-specific registers during GIC initialization
for systems with GICv3.1+ hardware.
6) Enables eSPI MMIO emulation for vGIC, allowing guest domains to
access and operate within the eSPI's INTIDs.

[1] https://github.com/torvalds/linux/commit/211bddd210a6746e4fdfa9b6cdfbdb15026530a7
[2] https://developer.arm.com/documentation/198123/0302/Arm-GIC-fundamentals?lang=en

Changes in V2:
- added 2 more patches to implement helper
  functions for gic/vgic:
  xen/arm: gic: implement helper functions for INTID checks
  xen/arm: vgic: implement helper functions for virq checks
- removed 2 patches:
  xen/arm/irq: allow assignment/releasing of eSPI interrupts
  xen/arm: gic/irq: permit routing of eSPI interrupts to Xen and domains
  since their functionality can be moved to appropriate patches after
  introducing patches with helper functions
- individual changes in patches

Link on V1:
- https://lists.xenproject.org/archives/html/xen-devel/2025-07/msg01809.html

Leonid Komarianskyi (10):
  xen/arm: gicv3: refactor obtaining GIC addresses for common operations
  xen/arm: gic: implement helper functions for INTID checks
  xen/arm: vgic: implement helper functions for virq checks
  xen/arm/irq: add handling for IRQs in the eSPI range
  xen/arm: gicv3: implement handling of GICv3.1 eSPI
  xen/arm/irq: allow eSPI processing in the do_IRQ function
  xen/arm: gicv3: modify ICH_LR_PHYSICAL_MASK to allow eSPI processing
  xen/arm: vgic: add resource management for extended SPIs
  xen/arm: domain_build: adjust Dom0 IRQ handling to support eSPIs
  xen/arm: vgic-v3: add emulation of GICv3.1 eSPI registers

 xen/arch/arm/Kconfig                   |   9 +
 xen/arch/arm/domain_build.c            |  10 +
 xen/arch/arm/gic-v3.c                  | 172 +++++++++++++----
 xen/arch/arm/gic.c                     |   7 +-
 xen/arch/arm/include/asm/gic.h         |  26 +++
 xen/arch/arm/include/asm/gic_v3_defs.h |  35 +++-
 xen/arch/arm/include/asm/irq.h         |  26 +++
 xen/arch/arm/include/asm/vgic.h        |  36 ++++
 xen/arch/arm/irq.c                     |  34 +++-
 xen/arch/arm/vgic-v3.c                 | 248 ++++++++++++++++++++++++-
 xen/arch/arm/vgic.c                    | 155 +++++++++++++++-
 11 files changed, 711 insertions(+), 47 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 55+ messages in thread

end of thread, other threads:[~2025-08-25 14:07 UTC | newest]

Thread overview: 55+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-07 12:33 [PATCH v2 00/10] Introduce eSPI support Leonid Komarianskyi
2025-08-07 12:33 ` [PATCH v2 01/10] xen/arm: gicv3: refactor obtaining GIC addresses for common operations Leonid Komarianskyi
2025-08-07 12:33   ` [PATCH v2 03/10] xen/arm: vgic: implement helper functions for virq checks Leonid Komarianskyi
2025-08-21 15:46     ` Volodymyr Babchuk
2025-08-22  7:55       ` Leonid Komarianskyi
2025-08-22 12:28         ` Volodymyr Babchuk
2025-08-22 15:08           ` Leonid Komarianskyi
2025-08-23 12:29     ` Oleksandr Tyshchenko
2025-08-24 18:08       ` Leonid Komarianskyi
2025-08-07 12:33   ` [PATCH v2 02/10] xen/arm: gic: implement helper functions for INTID checks Leonid Komarianskyi
2025-08-21 15:39     ` Volodymyr Babchuk
2025-08-21 16:24       ` Julien Grall
2025-08-22  7:30         ` Leonid Komarianskyi
2025-08-07 12:33   ` [PATCH v2 05/10] xen/arm: gicv3: implement handling of GICv3.1 eSPI Leonid Komarianskyi
2025-08-21 16:16     ` Volodymyr Babchuk
2025-08-22 14:39       ` Leonid Komarianskyi
2025-08-23 14:23     ` Oleksandr Tyshchenko
2025-08-24 18:17       ` Leonid Komarianskyi
2025-08-07 12:33   ` [PATCH v2 04/10] xen/arm/irq: add handling for IRQs in the eSPI range Leonid Komarianskyi
2025-08-21 15:59     ` Volodymyr Babchuk
2025-08-21 16:46       ` Julien Grall
2025-08-21 16:59         ` Volodymyr Babchuk
2025-08-21 17:13           ` Julien Grall
2025-08-21 17:38             ` Volodymyr Babchuk
2025-08-22 12:41             ` Leonid Komarianskyi
2025-08-22 12:59       ` Leonid Komarianskyi
2025-08-07 12:33   ` [PATCH v2 07/10] xen/arm: gicv3: modify ICH_LR_PHYSICAL_MASK to allow eSPI processing Leonid Komarianskyi
2025-08-21 16:27     ` Volodymyr Babchuk
2025-08-22  6:56       ` Leonid Komarianskyi
2025-08-07 12:33   ` [PATCH v2 06/10] xen/arm/irq: allow eSPI processing in the do_IRQ function Leonid Komarianskyi
2025-08-07 12:33   ` [PATCH v2 08/10] xen/arm: vgic: add resource management for extended SPIs Leonid Komarianskyi
2025-08-21 16:43     ` Volodymyr Babchuk
2025-08-22  8:27       ` Leonid Komarianskyi
2025-08-23 14:39     ` Oleksandr Tyshchenko
2025-08-24 18:28       ` Leonid Komarianskyi
2025-08-07 12:33   ` [PATCH v2 10/10] xen/arm: vgic-v3: add emulation of GICv3.1 eSPI registers Leonid Komarianskyi
2025-08-21 16:17     ` Oleksandr Tyshchenko
2025-08-22 10:47       ` Leonid Komarianskyi
2025-08-21 17:26     ` Volodymyr Babchuk
2025-08-22 10:00       ` Leonid Komarianskyi
2025-08-25 14:07       ` Leonid Komarianskyi
2025-08-07 12:33   ` [PATCH v2 09/10] xen/arm: domain_build: adjust Dom0 IRQ handling to support eSPIs Leonid Komarianskyi
2025-08-21 16:46     ` Volodymyr Babchuk
2025-08-22  7:08       ` Leonid Komarianskyi
2025-08-22 12:26         ` Volodymyr Babchuk
2025-08-22 15:03           ` Leonid Komarianskyi
2025-08-23 13:02     ` Oleksandr Tyshchenko
2025-08-24 18:47       ` Leonid Komarianskyi
2025-08-21 16:00   ` [PATCH v2 01/10] xen/arm: gicv3: refactor obtaining GIC addresses for common operations Volodymyr Babchuk
2025-08-21 16:14   ` Julien Grall
2025-08-22  9:09     ` Leonid Komarianskyi
2025-08-22  9:38       ` Julien Grall
2025-08-22 10:09         ` Leonid Komarianskyi
2025-08-24 17:21 ` [PATCH v2 00/10] Introduce eSPI support Oleksandr Tyshchenko
2025-08-24 18:58   ` Leonid Komarianskyi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.