[PATCH v3 06/11] xen/arm/irq: allow eSPI processing in the do_IRQ function

Leonid Komarianskyi posted 11 patches 2 months ago
[PATCH v3 06/11] xen/arm/irq: allow eSPI processing in the do_IRQ function
Posted by Leonid Komarianskyi 2 months ago
The do_IRQ() function is the main handler for processing IRQs.
Currently, due to restrictive checks, it does not process interrupt
numbers greater than 1024. This patch updates the condition to allow
the handling of interrupts from the eSPI range.

Signed-off-by: Leonid Komarianskyi <leonid_komarianskyi@epam.com>

---
Changes in V2:
- no changes

Changes in V3:
- no changes
---
 xen/arch/arm/gic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
index b88237ccda..634b77c987 100644
--- a/xen/arch/arm/gic.c
+++ b/xen/arch/arm/gic.c
@@ -341,7 +341,7 @@ void gic_interrupt(struct cpu_user_regs *regs, int is_fiq)
         /* Reading IRQ will ACK it */
         irq = gic_hw_ops->read_irq();
 
-        if ( likely(irq >= GIC_SGI_STATIC_MAX && irq < 1020) )
+        if ( likely(irq >= GIC_SGI_STATIC_MAX && irq < 1020) || is_espi(irq) )
         {
             isb();
             do_IRQ(regs, irq, is_fiq);
-- 
2.34.1
Re: [PATCH v3 06/11] xen/arm/irq: allow eSPI processing in the do_IRQ function
Posted by Volodymyr Babchuk 2 months ago
Hi,

Leonid Komarianskyi <Leonid_Komarianskyi@epam.com> writes:

> The do_IRQ() function is the main handler for processing IRQs.

but you are making change to gic_interrupt() function... I think you
need to update the commit message and subject.

> Currently, due to restrictive checks, it does not process interrupt
> numbers greater than 1024. This patch updates the condition to allow

But check reads "irq < 1020"...

> the handling of interrupts from the eSPI range.
>

With commit message fixed:

Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>

> Signed-off-by: Leonid Komarianskyi <leonid_komarianskyi@epam.com>
>
> ---
> Changes in V2:
> - no changes
>
> Changes in V3:
> - no changes
> ---
>  xen/arch/arm/gic.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
> index b88237ccda..634b77c987 100644
> --- a/xen/arch/arm/gic.c
> +++ b/xen/arch/arm/gic.c
> @@ -341,7 +341,7 @@ void gic_interrupt(struct cpu_user_regs *regs, int is_fiq)
>          /* Reading IRQ will ACK it */
>          irq = gic_hw_ops->read_irq();
>  
> -        if ( likely(irq >= GIC_SGI_STATIC_MAX && irq < 1020) )
> +        if ( likely(irq >= GIC_SGI_STATIC_MAX && irq < 1020) || is_espi(irq) )
>          {
>              isb();
>              do_IRQ(regs, irq, is_fiq);

-- 
WBR, Volodymyr
Re: [PATCH v3 06/11] xen/arm/irq: allow eSPI processing in the do_IRQ function
Posted by Leonid Komarianskyi 2 months ago
Hi Volodymyr,

Thank you for your review.

On 27.08.25 01:30, Volodymyr Babchuk wrote:
> 
> Hi,
> 
> Leonid Komarianskyi <Leonid_Komarianskyi@epam.com> writes:
> 
>> The do_IRQ() function is the main handler for processing IRQs.
> 
> but you are making change to gic_interrupt() function... I think you
> need to update the commit message and subject.
> 
>> Currently, due to restrictive checks, it does not process interrupt
>> numbers greater than 1024. This patch updates the condition to allow
> 
> But check reads "irq < 1020"...
> 
>> the handling of interrupts from the eSPI range.
>>
> 
> With commit message fixed:
> 
> Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
> 

Oh, yes, my mistakes. I will update the commit message in V4.

>> Signed-off-by: Leonid Komarianskyi <leonid_komarianskyi@epam.com>
>>
>> ---
>> Changes in V2:
>> - no changes
>>
>> Changes in V3:
>> - no changes
>> ---
>>   xen/arch/arm/gic.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
>> index b88237ccda..634b77c987 100644
>> --- a/xen/arch/arm/gic.c
>> +++ b/xen/arch/arm/gic.c
>> @@ -341,7 +341,7 @@ void gic_interrupt(struct cpu_user_regs *regs, int is_fiq)
>>           /* Reading IRQ will ACK it */
>>           irq = gic_hw_ops->read_irq();
>>   
>> -        if ( likely(irq >= GIC_SGI_STATIC_MAX && irq < 1020) )
>> +        if ( likely(irq >= GIC_SGI_STATIC_MAX && irq < 1020) || is_espi(irq) )
>>           {
>>               isb();
>>               do_IRQ(regs, irq, is_fiq);
> 

Best regards,
Leonid