[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/6] pci: Add INTx no-route option
From: |
Alex Williamson |
Subject: |
[Qemu-devel] [PATCH 1/6] pci: Add INTx no-route option |
Date: |
Tue, 02 Oct 2012 13:21:41 -0600 |
User-agent: |
StGIT/0.14.3 |
pci_device_route_intx_to_irq() has no probe capability. vfio-pci
can make use of KVM acceleration if this information is available,
but can still operate without it. Make it non-fatal to call this
on a platform or chipset where it hasn't been implemented yet.
Signed-off-by: Alex Williamson <address@hidden>
---
hw/pci.c | 8 ++++++--
hw/pci.h | 1 +
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/hw/pci.c b/hw/pci.c
index f855cf3..9cb0ad4 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -1094,8 +1094,12 @@ PCIINTxRoute pci_device_route_intx_to_irq(PCIDevice
*dev, int pin)
pin = bus->map_irq(dev, pin);
dev = bus->parent_dev;
} while (dev);
- assert(bus->route_intx_to_irq);
- return bus->route_intx_to_irq(bus->irq_opaque, pin);
+
+ if (bus->route_intx_to_irq) {
+ return bus->route_intx_to_irq(bus->irq_opaque, pin);
+ }
+
+ return (PCIINTxRoute) { PCI_INTX_NOROUTE, -1 };
}
void pci_bus_fire_intx_routing_notifier(PCIBus *bus)
diff --git a/hw/pci.h b/hw/pci.h
index 4b6ab3d..ed1a372 100644
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -146,6 +146,7 @@ typedef struct PCIINTxRoute {
PCI_INTX_ENABLED,
PCI_INTX_INVERTED,
PCI_INTX_DISABLED,
+ PCI_INTX_NOROUTE,
} mode;
int irq;
} PCIINTxRoute;
[Qemu-devel] [PATCH 3/6] pci: Helper function for testing if an INTx route changed, Alex Williamson, 2012/10/02
[Qemu-devel] [PATCH 4/6] pci-assign: Use pci_intx_route_changed(), Alex Williamson, 2012/10/02
[Qemu-devel] [PATCH 5/6] msi: Add msi_get_message(), Alex Williamson, 2012/10/02
[Qemu-devel] [PATCH 6/6] pci-assign: Use msi_get_message(), Alex Williamson, 2012/10/02
Re: [Qemu-devel] [PATCH 0/6] Misc PCI cleanups, Alex Williamson, 2012/10/08