8 #include <linux/list.h>
9 #include <linux/slab.h>
10 #include <linux/pci.h>
14 #define PCI_SLOT_MAX 32
36 if (domain != 0 || bus != 0)
76 "Can't export bridges on the virtual PCI bus");
84 "Error adding entry to virtual PCI bus");
104 if (match_slot(dev, t->
dev)) {
106 "assign to virtual slot %d func %d\n",
121 ": vpci: %s: assign to virtual slot %d\n",
122 pci_name(dev),
slot);
132 "No more space on root virtual PCI bus");
186 INIT_LIST_HEAD(&vpci_dev->
dev_list[slot]);
197 return publish_cb(pdev, 0, 0);
219 static int __xen_pcibk_get_pcifront_dev(
struct pci_dev *
pcidev,
221 unsigned int *domain,
unsigned int *bus,
235 if (dev && dev->
bus->number == pcidev->
bus->number
253 .init = __xen_pcibk_init_devices,
254 .free = __xen_pcibk_release_devices,
255 .find = __xen_pcibk_get_pcifront_dev,
256 .publish = __xen_pcibk_publish_pci_roots,
257 .release = __xen_pcibk_release_pci_dev,
258 .add = __xen_pcibk_add_pci_dev,
259 .get = __xen_pcibk_get_pci_dev,