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] [PATCH] linux: fix IRQ handling for PV passthrough

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] linux: fix IRQ handling for PV passthrough
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Wed, 04 Feb 2009 11:40:35 +0000
Delivery-date: Wed, 04 Feb 2009 03:48:17 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

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