All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leonid Komarianskyi <Leonid_Komarianskyi@epam.com>
To: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: "olekstysh@gmail.com" <olekstysh@gmail.com>,
	Leonid Komarianskyi <Leonid_Komarianskyi@epam.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Julien Grall <julien@xen.org>,
	Bertrand Marquis <bertrand.marquis@arm.com>,
	Michal Orzel <michal.orzel@amd.com>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
	Anthony PERARD <anthony.perard@vates.tech>,
	Oleksii Kurochko <oleksii.kurochko@gmail.com>,
	Community Manager <community.manager@xenproject.org>
Subject: [PATCH v5 00/12] Introduce eSPI support
Date: Fri, 29 Aug 2025 16:06:07 +0000	[thread overview]
Message-ID: <cover.1756481577.git.leonid_komarianskyi@epam.com> (raw)

Hello everyone!

This is V5 of the patch series to introduce eSPI support, which contains
fixes and improvements based on the comments received in V4.

The main changes in this version compared to V4 are related to removing
unnecessary #ifdefs that previously prevented the use of certain defines
and macros, leading to an overuse of #ifdefs. After refactoring, it is
now possible to reuse the existing code for vGIC eSPI emulation, which
improves readability and simplifies future changes. As some patches that
had already been reviewed were modified, I would ask Volodymyr and
Oleksandr to take a look at the updated versions of:

[4/12] xen/arm/irq: add handling for IRQs in the eSPI range
[5/12] xen/arm: gicv3: implement handling of GICv3.1 eSPI

The changes made in these patches allowed me to significantly simplify
the following patch:

[10/12] xen/arm: vgic-v3: add emulation of GICv3.1 eSPI registers

For the other patches, I have addressed comments and added reviewed-by
or acked-by tags accordingly, based on the received comments.

Summarized description:
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 n) 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.
7) Updating documentation and CHANGELOG to reflect the changes made for eSPI
support.

Also, to simplify reviewing, please find below link to unsquashed patches, that
are on top of every patch, that is changed in the series, compared to V4:
https://github.com/LKomaryanskiy/xen/commits/espi-support-master-upstream-v5-unsquashed/


Changes in V5:
- individual changes in patches

Link on V4:
- https://lists.xenproject.org/archives/html/xen-devel/2025-08/msg01767.html

Changes in V4:
- added a patch for documentation
- individual changes in patches

Link on V3:
- https://lists.xenproject.org/archives/html/xen-devel/2025-08/msg01628.html

Changes in V3:
- added a patch to update CHANGELOG.md
- individual changes in patches

Link on V2:
- https://lists.xenproject.org/archives/html/xen-devel/2025-08/msg00372.html

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 (12):
  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 gic_interrupt 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/dom0less-build: adjust domains config to support
    eSPIs
  xen/arm: vgic-v3: add emulation of GICv3.1 eSPI registers
  doc/man: update description for nr_spis with eSPI
  CHANGELOG.md: add mention of GICv3.1 eSPI support

 CHANGELOG.md                           |   2 +
 docs/man/xl.cfg.5.pod.in               |  13 +-
 xen/arch/arm/Kconfig                   |   8 +
 xen/arch/arm/dom0less-build.c          |   2 +-
 xen/arch/arm/domain_build.c            |   2 +-
 xen/arch/arm/gic-v3.c                  | 195 +++++++++++++++++----
 xen/arch/arm/gic.c                     |   8 +-
 xen/arch/arm/include/asm/gic.h         |  31 ++++
 xen/arch/arm/include/asm/gic_v3_defs.h |  40 ++++-
 xen/arch/arm/include/asm/irq.h         |  25 +++
 xen/arch/arm/include/asm/vgic.h        |  42 +++++
 xen/arch/arm/irq.c                     |  62 ++++++-
 xen/arch/arm/vgic-v3.c                 | 198 +++++++++++++++++----
 xen/arch/arm/vgic.c                    | 232 ++++++++++++++++++++++++-
 xen/arch/arm/vgic/vgic.c               |   5 +
 15 files changed, 778 insertions(+), 87 deletions(-)

-- 
2.34.1


             reply	other threads:[~2025-08-29 16:06 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-29 16:06 Leonid Komarianskyi [this message]
2025-08-29 16:06 ` [PATCH v5 01/12] xen/arm: gicv3: refactor obtaining GIC addresses for common operations Leonid Komarianskyi
2025-08-31 12:42   ` Oleksandr Tyshchenko
2025-09-01 14:36     ` Leonid Komarianskyi
2025-08-29 16:06 ` [PATCH v5 02/12] xen/arm: gic: implement helper functions for INTID checks Leonid Komarianskyi
2025-08-29 16:06 ` [PATCH v5 03/12] xen/arm: vgic: implement helper functions for virq checks Leonid Komarianskyi
2025-08-29 16:06 ` [PATCH v5 04/12] xen/arm/irq: add handling for IRQs in the eSPI range Leonid Komarianskyi
2025-08-29 19:45   ` Volodymyr Babchuk
2025-08-31 14:08     ` Oleksandr Tyshchenko
2025-09-01 14:42       ` Leonid Komarianskyi
2025-09-01 16:16         ` Julien Grall
2025-09-02  6:56           ` Leonid Komarianskyi
2025-09-01 16:11   ` Julien Grall
2025-09-02  8:56     ` Leonid Komarianskyi
2025-09-02 13:11       ` Julien Grall
2025-08-29 16:06 ` [PATCH v5 05/12] xen/arm: gicv3: implement handling of GICv3.1 eSPI Leonid Komarianskyi
2025-08-29 19:55   ` Volodymyr Babchuk
2025-09-01 17:30     ` Leonid Komarianskyi
2025-08-31 14:56   ` Oleksandr Tyshchenko
2025-08-29 16:06 ` [PATCH v5 06/12] xen/arm/irq: allow eSPI processing in the gic_interrupt function Leonid Komarianskyi
2025-09-02 13:42   ` Julien Grall
2025-08-29 16:06 ` [PATCH v5 07/12] xen/arm: gicv3: modify ICH_LR_PHYSICAL_MASK to allow eSPI processing Leonid Komarianskyi
2025-09-02 13:53   ` Julien Grall
2025-09-02 17:06     ` Leonid Komarianskyi
2025-08-29 16:06 ` [PATCH v5 08/12] xen/arm: vgic: add resource management for extended SPIs Leonid Komarianskyi
2025-08-29 20:45   ` Volodymyr Babchuk
2025-08-31 15:58     ` Oleksandr Tyshchenko
2025-09-01 18:00       ` Leonid Komarianskyi
2025-09-02  8:16         ` Oleksandr Tyshchenko
2025-09-01 17:38     ` Leonid Komarianskyi
2025-09-02 14:13   ` Julien Grall
2025-09-02 20:24     ` Leonid Komarianskyi
2025-08-29 16:06 ` [PATCH v5 09/12] xen/arm: domain_build/dom0less-build: adjust domains config to support eSPIs Leonid Komarianskyi
2025-09-02 16:42   ` Julien Grall
2025-09-02 17:15     ` Leonid Komarianskyi
2025-09-02 19:59       ` Julien Grall
2025-08-29 16:06 ` [PATCH v5 10/12] xen/arm: vgic-v3: add emulation of GICv3.1 eSPI registers Leonid Komarianskyi
2025-08-29 20:12   ` Volodymyr Babchuk
2025-09-01 18:32     ` Leonid Komarianskyi
2025-09-01 12:38   ` Oleksandr Tyshchenko
2025-09-01 18:27     ` Leonid Komarianskyi
2025-09-02 16:55   ` Julien Grall
2025-09-02 17:26     ` Leonid Komarianskyi
2025-09-02 20:20       ` Julien Grall
2025-09-02 20:55         ` Leonid Komarianskyi
2025-09-03 11:26           ` Julien Grall
2025-09-03 11:45             ` Leonid Komarianskyi
2025-08-29 16:06 ` [PATCH v5 11/12] doc/man: update description for nr_spis with eSPI Leonid Komarianskyi
2025-08-29 16:06 ` [PATCH v5 12/12] CHANGELOG.md: add mention of GICv3.1 eSPI support Leonid Komarianskyi

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=cover.1756481577.git.leonid_komarianskyi@epam.com \
    --to=leonid_komarianskyi@epam.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=anthony.perard@vates.tech \
    --cc=bertrand.marquis@arm.com \
    --cc=community.manager@xenproject.org \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=oleksii.kurochko@gmail.com \
    --cc=olekstysh@gmail.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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 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.