[PATCH] x86/irq: fix reporting of spurious i8259 interrupts

Roger Pau Monne posted 1 patch 8 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20230828101428.23579-1-roger.pau@citrix.com
xen/arch/x86/i8259.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] x86/irq: fix reporting of spurious i8259 interrupts
Posted by Roger Pau Monne 8 months, 1 week ago
The return value of bogus_8259A_irq() is wrong: the function will
return `true` when the IRQ is real and `false` when it's a spurious
IRQ.  This causes the "No irq handler for vector ..." message in
do_IRQ() to be printed for spurious i8259 interrupts which is not
intended (and not helpful).

Fix by inverting the return value of bogus_8259A_irq().

Fixes: 132906348a14 ('x86/i8259: Handle bogus spurious interrupts more quietly')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
 xen/arch/x86/i8259.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/i8259.c b/xen/arch/x86/i8259.c
index 6b35be10f09a..ed9f55abe51e 100644
--- a/xen/arch/x86/i8259.c
+++ b/xen/arch/x86/i8259.c
@@ -37,7 +37,7 @@ static bool _mask_and_ack_8259A_irq(unsigned int irq);
 
 bool bogus_8259A_irq(unsigned int irq)
 {
-    return _mask_and_ack_8259A_irq(irq);
+    return !_mask_and_ack_8259A_irq(irq);
 }
 
 static void cf_check mask_and_ack_8259A_irq(struct irq_desc *desc)
-- 
2.41.0


Re: [PATCH] x86/irq: fix reporting of spurious i8259 interrupts
Posted by Jan Beulich 8 months, 1 week ago
On 28.08.2023 12:14, Roger Pau Monne wrote:
> The return value of bogus_8259A_irq() is wrong: the function will
> return `true` when the IRQ is real and `false` when it's a spurious
> IRQ.  This causes the "No irq handler for vector ..." message in
> do_IRQ() to be printed for spurious i8259 interrupts which is not
> intended (and not helpful).
> 
> Fix by inverting the return value of bogus_8259A_irq().
> 
> Fixes: 132906348a14 ('x86/i8259: Handle bogus spurious interrupts more quietly')
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>