From: Stefano Stabellini Date: Wed, 31 Aug 2011 14:23:34 +0000 (+0100) Subject: xen: __hvm_pci_intx_assert should check for gsis remapped onto pirqs X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~9929 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a7ffe0fdecc06a1518622e2774b3567fa78f378b;p=xen.git 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 --- diff --git a/xen/arch/x86/hvm/irq.c b/xen/arch/x86/hvm/irq.c index fb82094a89..9eee271c89 100644 --- a/xen/arch/x86/hvm/irq.c +++ b/xen/arch/x86/hvm/irq.c @@ -29,7 +29,7 @@ #include /* 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, 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); } @@ -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];