summaryrefslogtreecommitdiff
path: root/hw/pci.h
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2010-06-23 16:15:30 +0900
committerBlue Swirl <blauwirbel@gmail.com>2010-07-11 20:00:59 +0300
commit498238687fd3a2bf3efb32694732f88ceac72e99 (patch)
tree10fd1cca0fd960971145e5a4c0dd3a49fb3b7c91 /hw/pci.h
parentf4594a3be005ea96e276a1354184258f5ef3b8da (diff)
pci: introduce multifunction property.
introduce multifunction property. Also introduce new convenient device creation function which will be used later. For bisectability this patch doesn't do anything, but sets the property resulting in no functional changes. Actual changes will be introduced by later patch. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/pci.h')
-rw-r--r--hw/pci.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/pci.h b/hw/pci.h
index 5fda430a97..2097a7ca9f 100644
--- 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);