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

[Xen-changelog] [xen-unstable] xen: __hvm_pci_intx_assert should check for gsis remapped onto pirqs



# HG changeset patch
# User Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
# Date 1314800614 -3600
# Node ID 2297b90a6a7bec2655672f4e775664046be0b3c4
# Parent  4226ea1785b5a30df45f3bde2947bc65a685fed9
xen: __hvm_pci_intx_assert should check for gsis remapped onto pirqs

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 4226ea1785b5 -r 2297b90a6a7b xen/arch/x86/hvm/irq.c
--- a/xen/arch/x86/hvm/irq.c    Wed Aug 31 15:23:12 2011 +0100
+++ b/xen/arch/x86/hvm/irq.c    Wed Aug 31 15:23:34 2011 +0100
@@ -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 @@
         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 @@
 
     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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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