[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC 11/16] irq: skip action avalability check for guest's IRQ



Hi Andrii,

On 28/11/2018 21:32, Andrii Anisov wrote:
From: Andrii Anisov <andrii_anisov@xxxxxxxx>

An IRQ assigned to guest always has an action. This removes
another odd check on guest IRQ path.

And you can't see any potential race in that code happening in the future?

Also getting an unknown
interrupt is very unlikely on a non-debug platform.

I am tempted to keep the code at the same place but protect with an #ifndef NDEBUG. What do you think?

Like patch #5, feel free to resend the patch alone for Xen 4.12.

Cheers,


Signed-off-by: Andrii Anisov <andrii_anisov@xxxxxxxx>
---
  xen/arch/arm/irq.c | 14 +++++++-------
  1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c
index 596a8b8..5debfc5 100644
--- a/xen/arch/arm/irq.c
+++ b/xen/arch/arm/irq.c
@@ -205,13 +205,6 @@ void do_IRQ(struct cpu_user_regs *regs, unsigned int irq, 
int is_fiq)
      spin_lock(&desc->lock);
      desc->handler->ack(desc);
- if ( !desc->action )
-    {
-        printk("Unknown %s %#3.3x\n",
-               is_fiq ? "FIQ" : "IRQ", irq);
-        goto out;
-    }
-
      if ( test_bit(_IRQ_GUEST, &desc->status) )
      {
          struct irq_guest *info = irq_get_guest_info(desc);
@@ -229,6 +222,13 @@ void do_IRQ(struct cpu_user_regs *regs, unsigned int irq, 
int is_fiq)
          goto out_no_end;
      }
+ if ( unlikely(!desc->action) )
+    {
+        printk("Unknown %s %#3.3x\n",
+               is_fiq ? "FIQ" : "IRQ", irq);
+        goto out;
+    }
+
      set_bit(_IRQ_PENDING, &desc->status);
/*


--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.