diff options
| author | Anthony Liguori <aliguori@us.ibm.com> | 2012-06-26 15:05:33 -0500 |
|---|---|---|
| committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-06-26 15:05:33 -0500 |
| commit | 7a542b67b32742ff5fe286f819df891d1df7bf56 (patch) | |
| tree | cc85c3d9c0c381ae32178616c5956879cd554cb4 /hw/pci.c | |
| parent | b1a6609e754330c657a057a96322e574c129bc29 (diff) | |
| parent | 3854ca577dad92c4fe97b4a6ebce360e25407af7 (diff) | |
| download | focaccia-qemu-7a542b67b32742ff5fe286f819df891d1df7bf56.tar.gz focaccia-qemu-7a542b67b32742ff5fe286f819df891d1df7bf56.zip | |
Merge remote-tracking branch 'sstabellini/xen-pt' into staging
* sstabellini/xen-pt: Introduce Xen PCI Passthrough, MSI Introduce apic-msidef.h Introduce Xen PCI Passthrough, PCI config space helpers Introduce Xen PCI Passthrough, qdevice qdev-properties: Introduce pci-host-devaddr. pci.c: Add opaque argument to pci_for_each_device. Introduce XenHostPCIDevice to access a pci device on the host. configure: Introduce --enable-xen-pci-passthrough. pci_ids: Add INTEL_82599_SFP_VF id.
Diffstat (limited to 'hw/pci.c')
| -rw-r--r-- | hw/pci.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/hw/pci.c b/hw/pci.c index bdfb3d6540..5c75f16781 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -1144,7 +1144,9 @@ static const pci_class_desc pci_class_descriptions[] = }; static void pci_for_each_device_under_bus(PCIBus *bus, - void (*fn)(PCIBus *b, PCIDevice *d)) + void (*fn)(PCIBus *b, PCIDevice *d, + void *opaque), + void *opaque) { PCIDevice *d; int devfn; @@ -1152,18 +1154,19 @@ static void pci_for_each_device_under_bus(PCIBus *bus, for(devfn = 0; devfn < ARRAY_SIZE(bus->devices); devfn++) { d = bus->devices[devfn]; if (d) { - fn(bus, d); + fn(bus, d, opaque); } } } void pci_for_each_device(PCIBus *bus, int bus_num, - void (*fn)(PCIBus *b, PCIDevice *d)) + void (*fn)(PCIBus *b, PCIDevice *d, void *opaque), + void *opaque) { bus = pci_find_bus_nr(bus, bus_num); if (bus) { - pci_for_each_device_under_bus(bus, fn); + pci_for_each_device_under_bus(bus, fn, opaque); } } |