aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>2011-08-31 15:32:47 +0100
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2011-08-31 15:32:47 +0100
commite75f5779d4a1f53208cf0de6a293aeff0fe86ab4 (patch)
tree9086a8d97c5c91734a7b864be6c5d6768c7a520e
parent0596edb27f162c8bcdeb60b8b35dea812ba655ac (diff)
downloadxen-e75f5779d4a1f53208cf0de6a293aeff0fe86ab4.tar.gz
xen-e75f5779d4a1f53208cf0de6a293aeff0fe86ab4.tar.bz2
xen-e75f5779d4a1f53208cf0de6a293aeff0fe86ab4.zip
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@eu.citrix.com> xen-unstable changeset: 23807:2297b90a6a7b xen-unstable date: Wed Aug 31 15:23:34 2011 +0100
-rw-r--r--xen/arch/x86/hvm/irq.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/xen/arch/x86/hvm/irq.c b/xen/arch/x86/hvm/irq.c
index f560e392e6..acc9197f42 100644
--- a/xen/arch/x86/hvm/irq.c
+++ b/xen/arch/x86/hvm/irq.c
@@ -28,7 +28,7 @@
#include <asm/hvm/support.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)
{
int pirq = domain_emuirq_to_pirq(d, ioapic_gsi);
if ( hvm_domain_use_pirq(d, pirq) )
@@ -37,6 +37,11 @@ static void assert_irq(struct domain *d, unsigned ioapic_gsi, unsigned pic_irq)
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);
}
@@ -61,7 +66,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];