From: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
To: Julien Grall <julien@xen.org>
Cc: Leonid Komarianskyi <Leonid_Komarianskyi@epam.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
Stefano Stabellini <sstabellini@kernel.org>,
Bertrand Marquis <bertrand.marquis@arm.com>,
Michal Orzel <michal.orzel@amd.com>
Subject: Re: [PATCH v2 04/10] xen/arm/irq: add handling for IRQs in the eSPI range
Date: Thu, 21 Aug 2025 16:59:01 +0000 [thread overview]
Message-ID: <87frdkd31m.fsf@epam.com> (raw)
In-Reply-To: <9922f7f1-7249-424e-9bab-3aee2ce3b813@xen.org> (Julien Grall's message of "Thu, 21 Aug 2025 17:46:31 +0100")
Hi Julien,
Julien Grall <julien@xen.org> writes:
> Hi,
>
> On 21/08/2025 16:59, Volodymyr Babchuk wrote:
>> Leonid Komarianskyi <Leonid_Komarianskyi@epam.com> writes:
>>
>>> Currently, Xen does not support eSPI interrupts, leading
>>> to a data abort when such interrupts are defined in the DTS.
>>>
>>> This patch introduces a separate array to initialize up to
>>> 1024 interrupt descriptors in the eSPI range and adds the
>>> necessary defines and helper function. These changes lay the
>>> groundwork for future implementation of full eSPI interrupt
>>> support. As this GICv3.1 feature is not required by all vendors,
>>> all changes are guarded by ifdefs, depending on the corresponding
>>> Kconfig option.
>> I don't think that it is a good idea to hide this feature under
>> Kconfig
>> option, as this will increase number of different build variants.
>> I believe that runtime check for GICD_TYPER.ESPI should be
> sufficient,> but maintainers can correct me there.
>
> I haven't seen many board with ESPI available. So I think it would be
> better if this is under a Kconfig because not everyone may want to
> have the code.
Probably, we can expect more in the future... Anyways, after reviewing
all patches in the series, I can see that code will be littered with
#ifdef CONFIG_GICV3_ESPI, which, probably, not a good thing.
>
> [...]
>
>>> struct irq_desc;
>>> struct irqaction;
>>> @@ -55,6 +71,15 @@ static inline bool is_lpi(unsigned int irq)
>>> return irq >= LPI_OFFSET;
>>> }
>>> +static inline bool is_espi(unsigned int irq)
>>> +{
>>> +#ifdef CONFIG_GICV3_ESPI
>>> + return (irq >= ESPI_BASE_INTID && irq <= ESPI_MAX_INTID);
>>> +#else
>>> + return false;
>>> +#endif
>>> +}
>>> +
>>> #define domain_pirq_to_irq(d, pirq) (pirq)
>>> bool is_assignable_irq(unsigned int irq);
>>> diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c
>>> index 50e57aaea7..9bc72fbbc9 100644
>>> --- a/xen/arch/arm/irq.c
>>> +++ b/xen/arch/arm/irq.c
>>> @@ -19,7 +19,11 @@
>>> #include <asm/gic.h>
>>> #include <asm/vgic.h>
>>> +#ifdef CONFIG_GICV3_ESPI
>>> +const unsigned int nr_irqs = ESPI_MAX_INTID + 1;
>>> +#else
>>> const unsigned int nr_irqs = NR_IRQS;
>>> +#endif
>>> static unsigned int local_irqs_type[NR_LOCAL_IRQS];
>>> static DEFINE_SPINLOCK(local_irqs_type_lock);
>>> @@ -46,6 +50,9 @@ void irq_end_none(struct irq_desc *irq)
>>> }
>>> static irq_desc_t irq_desc[NR_IRQS - NR_LOCAL_IRQS];
>>> +#ifdef CONFIG_GICV3_ESPI
>>> +static irq_desc_t espi_desc[NR_IRQS];
>
> By how much will this increase the Xen binary?
I am wondering this also. The struct is cache aligned, so it will take
at least 128 bytes. The whole array will take at least 128kb. Not
great, not terrible. As this should go to .bss, it should not increase
the binary itself.
Maybe it is better to allocate this dynamically? I do understand that we
want to get rid of as many dynamic allocs as possible, but maybe in this
case it will be okay. As a bonus point, we can't leave this pointer
present even if CONFIG_GICV3_ESPI=n, which will simplify some code in
latter patches.
[...]
--
WBR, Volodymyr
next prev parent reply other threads:[~2025-08-21 16:59 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
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=87frdkd31m.fsf@epam.com \
--to=volodymyr_babchuk@epam.com \
--cc=Leonid_Komarianskyi@epam.com \
--cc=bertrand.marquis@arm.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.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.