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

[Xen-devel] [PATCH] linux: fix IRQ handling for PV passthrough



For DomU-s registering PIRQ-s must be done separately, as they don't
use the IO-APIC code.

Additionally make sure the IRQ chip doesn't get set twice (and the
event channel information overwritten) for an IRQ possibly in use by
more than one device.

Obviously IA64 would need a similar fix, but I can't see where it would
need to be put.

As usual, written and tested on 2.6.27.x and made apply to the 2.6.18
tree without further testing.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- a/arch/i386/pci/pcifront.c  2009-02-03 17:27:59.000000000 +0100
+++ b/arch/i386/pci/pcifront.c  2009-02-03 11:22:28.000000000 +0100
@@ -8,12 +8,14 @@
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <asm/acpi.h>
+#include <xen/evtchn.h>
 #include "pci.h"
 
 static int pcifront_enable_irq(struct pci_dev *dev)
 {
        u8 irq;
        pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
+       evtchn_register_pirq(irq);
        dev->irq = irq;
 
        return 0;
--- a/drivers/xen/core/evtchn.c 2009-01-14 15:16:43.000000000 +0100
+++ b/drivers/xen/core/evtchn.c 2009-02-03 17:34:44.000000000 +0100
@@ -1091,7 +1091,7 @@ core_initcall(evtchn_register);
 void evtchn_register_pirq(int irq)
 {
        BUG_ON(irq < PIRQ_BASE || irq - PIRQ_BASE > NR_PIRQS);
-       if (identity_mapped_irq(irq))
+       if (identity_mapped_irq(irq) || type_from_irq(irq) != IRQT_UNBOUND)
                return;
        irq_info[irq] = mk_irq_info(IRQT_PIRQ, irq, 0);
        irq_desc[irq].chip = &pirq_type;




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


 


Rackspace

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