WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] xen: fix de/assert_irq checks

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] xen: fix de/assert_irq checks
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Wed, 11 May 2011 16:45:45 +0100
Cc: Keir Fraser <keir@xxxxxxx>, Simon Rowe <Simon.Rowe@xxxxxxxxxxxxx>
Delivery-date: Wed, 11 May 2011 08:44:49 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
The checks in assert_irq and deassert_irq to distinguish interrupts that
have been remapped onto event channels from the others that have to be
injected using the emulated lapic are wrong.

Fix the condition checks using the convenient hvm_domain_use_pirq
function.

This patch should be backported to xen 4.1.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>

diff -r 4b0692880dfa xen/arch/x86/hvm/irq.c
--- a/xen/arch/x86/hvm/irq.c    Thu May 05 17:40:34 2011 +0100
+++ b/xen/arch/x86/hvm/irq.c    Wed May 11 12:32:31 2011 +0000
@@ -31,7 +31,7 @@
 static void assert_irq(struct domain *d, unsigned ioapic_gsi, unsigned pic_irq)
 {
     int pirq = domain_emuirq_to_pirq(d, ioapic_gsi);
-    if ( pirq != IRQ_UNBOUND )
+    if ( hvm_domain_use_pirq(d, pirq) )
     {
         send_guest_pirq(d, pirq);
         return;
@@ -43,7 +43,8 @@ static void assert_irq(struct domain *d,
 /* Must be called with hvm_domain->irq_lock hold */
 static void deassert_irq(struct domain *d, unsigned isa_irq)
 {
-    if ( domain_emuirq_to_pirq(d, isa_irq) != IRQ_UNBOUND )
+    int pirq = domain_emuirq_to_pirq(d, isa_irq);
+    if ( !hvm_domain_use_pirq(d, pirq) )
         vpic_irq_negative_edge(d, isa_irq);
 }
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] xen: fix de/assert_irq checks, Stefano Stabellini <=