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] xen: __hvm_pci_intx_assert should check for gsis remapped on

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] xen: __hvm_pci_intx_assert should check for gsis remapped onto pirqs
From: <stefano.stabellini@xxxxxxxxxxxxx>
Date: Wed, 31 Aug 2011 11:24:05 +0100
Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Delivery-date: Wed, 31 Aug 2011 03:19:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1314786246-15149-1-git-send-email-stefano.stabellini@xxxxxxxxxxxxx>
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>
References: <1314786246-15149-1-git-send-email-stefano.stabellini@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
If the isa irq corresponding to a particular gsi is disabled while the
gsi is enabled, __hvm_pci_intx_assert will always inject the gsi through
the violapic, even if the gsi has been remapped onto a pirq.
This patch makes sure that even in this case we inject the notification
appropriately.

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

diff -r 5814da0753df xen/arch/x86/hvm/irq.c
--- a/xen/arch/x86/hvm/irq.c    Tue Aug 30 11:56:22 2011 +0000
+++ b/xen/arch/x86/hvm/irq.c    Tue Aug 30 11:56:37 2011 +0000
@@ -29,7 +29,7 @@
 #include <asm/msi.h>
 
 /* Must be called with hvm_domain->irq_lock hold */
-static void assert_irq(struct domain *d, unsigned ioapic_gsi, unsigned pic_irq)
+static void assert_gsi(struct domain *d, unsigned ioapic_gsi)
 {
     struct pirq *pirq =
         pirq_info(d, domain_emuirq_to_pirq(d, ioapic_gsi));
@@ -40,6 +40,11 @@ static void assert_irq(struct domain *d,
         return;
     }
     vioapic_irq_positive_edge(d, ioapic_gsi);
+}
+
+static void assert_irq(struct domain *d, unsigned ioapic_gsi, unsigned pic_irq)
+{
+    assert_gsi(d, ioapic_gsi);
     vpic_irq_positive_edge(d, pic_irq);
 }
 
@@ -66,7 +71,7 @@ static void __hvm_pci_intx_assert(
 
     gsi = hvm_pci_intx_gsi(device, intx);
     if ( hvm_irq->gsi_assert_count[gsi]++ == 0 )
-        vioapic_irq_positive_edge(d, gsi);
+        assert_gsi(d, gsi);
 
     link    = hvm_pci_intx_link(device, intx);
     isa_irq = hvm_irq->pci_link.route[link];

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

<Prev in Thread] Current Thread [Next in Thread>