fix PV on HVM on xen/next-2.6.32
Subsystems (2)
PATCH 1/1 fix PV on HVM on xen/next-2.6.32
Hi Jeremy,
this patch makes PV on HVM work on xen/next-2.6.32: gsi and msi remapping is not supported when running as HVM guests yet.
I am working on irq remapping for HVM guests and I have a prototype working already but I think this simple fix is worth applying now anyway to fix HVM guests with this kernel as soon as possible.
---
arch/x86/kernel/apic/io_apic.c +1 -1
@@ -3505,7 +3505,7 @@ int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)if (type ==PCI_CAP_ID_MSI && nvec >1 )return 1 ; -if (xen_domain ()) +if (xen_pv_domain ())return xen_pci_setup_msi_irqs (dev, nvec, type); node =dev_to_node (&dev->dev);
arch/x86/xen/pci.c +2 -2
@@ -23,7 +23,7 @@ int xen_register_pirq(u32 gsi, int triggering)int shareable =0 ;char *name; -if (!xen_domain ()) +if (!xen_pv_domain ())return -1 ;if (triggering ==ACPI_EDGE_SENSITIVE ) {
@@ -61,7 +61,7 @@ int xen_register_gsi(u32 gsi, int triggering, int polarity)int rc, irq;struct physdev_setup_gsi setup_gsi; -if (!xen_domain ()) +if (!xen_pv_domain ())return -1 ; printk(KERN_DEBUG "xen: registering gsi %u triggering %d polarity %d\n",
2010/7/14 Stefano Stabellini <[email protected]>:
Quoted 39 lines
Hi Jeremy,
this patch makes PV on HVM work on xen/next-2.6.32: gsi and msi remapping is not supported when running as HVM guests yet.I am working on irq remapping for HVM guests and I have a prototype working already but I think this simple fix is worth applying now anyway to fix HVM guests with this kernel as soon as possible.
Signed-off-by Stefano Stabellini <[email protected]>---
arch/x86/kernel/apic/io_apic.c +1
-1@@ -3505,7 +3505,7 @@ int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) if (type == PCI_CAP_ID_MSI && nvec > 1) return 1; - if (xen_domain()) + if (xen_pv_domain()) return xen_pci_setup_msi_irqs(dev, nvec, type); node = dev_to_node(&dev->dev);arch/x86/xen/pci.c +1
-1@@ -23,7 +23,7 @@ int xen_register_pirq(u32 gsi, int triggering) int shareable = 0; char *name; - if (!xen_domain()) + if (!xen_pv_domain()) return -1; if (triggering == ACPI_EDGE_SENSITIVE) {
arch/x86/xen/pci.c int xen_register_gsi(u32 gsi, int triggering, int polarity) · line 67
Quoted 8 lines
arch/x86/xen/pci.c +1
-1@@ -61,7 +61,7 @@ int xen_register_gsi(u32 gsi, int triggering, int polarity) int rc, irq; struct physdev_setup_gsi setup_gsi; - if (!xen_domain()) + if (!xen_pv_domain()) return -1; printk(KERN_DEBUG "xen: registering gsi %u triggering %d polarity %d\n",
It was commited to xen/next and I tested it. Now it doesn't hang on ACPI stuff. Thx Stefano.
Now I'm getting kernel panic(kernel BUG at drivers/xen/balloon.c:528!), but I'll send another mail with bug report.
Signature · 1 line
Łukasz Oleś