]> git.proxmox.com Git - mirror_qemu.git/blobdiff - hw/pci.h
pci: introduce multifunction property.
[mirror_qemu.git] / hw / pci.h
index 5fda430a97607a671560b6ccc8b5c042666c6cea..2097a7ca9ff9e14d6510b5df19ff63d9081459fc 100644 (file)
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -111,6 +111,10 @@ typedef struct PCIIORegion {
 enum {
     QEMU_PCI_CAP_MSIX = 0x1,
     QEMU_PCI_CAP_EXPRESS = 0x2,
+
+    /* multifunction capable device */
+#define QEMU_PCI_CAP_MULTIFUNCTION_BITNR        2
+    QEMU_PCI_CAP_MULTIFUNCTION = (1 << QEMU_PCI_CAP_MULTIFUNCTION_BITNR),
 };
 
 struct PCIDevice {
@@ -342,6 +346,11 @@ typedef struct {
 void pci_qdev_register(PCIDeviceInfo *info);
 void pci_qdev_register_many(PCIDeviceInfo *info);
 
+PCIDevice *pci_create_multifunction(PCIBus *bus, int devfn, bool multifunction,
+                                    const char *name);
+PCIDevice *pci_create_simple_multifunction(PCIBus *bus, int devfn,
+                                           bool multifunction,
+                                           const char *name);
 PCIDevice *pci_create(PCIBus *bus, int devfn, const char *name);
 PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name);