summaryrefslogtreecommitdiff
path: root/hw/pci/pci-hotplug-old.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2013-06-06 18:48:51 +1000
committerMichael S. Tsirkin <mst@redhat.com>2013-07-07 23:10:57 +0300
commit29b358f93a48a415853d11fc9b02f711b5ec8f76 (patch)
treeb09d6014da1942fe62614830996552dec90fd18d /hw/pci/pci-hotplug-old.c
parent85c6e4fabb4c26e5cd8a024415ed2f5bcdd578db (diff)
downloadqemu-29b358f93a48a415853d11fc9b02f711b5ec8f76.tar.gz
pci: Add root bus parameter to pci_nic_init()
At present, pci_nic_init() and pci_nic_init_nofail() assume that they will only create a NIC under the primary PCI root. As we add support for multiple PCI roots, that may no longer be the case. This patch adds a root bus parameter to pci_nic_init() (and updates callers accordingly) to allow the machine init code using it to specify the right PCI root for NICs created by old-style -net nic parameters. NICs created new-style, with -device can of course be put anywhere. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pci/pci-hotplug-old.c')
-rw-r--r--hw/pci/pci-hotplug-old.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/pci/pci-hotplug-old.c b/hw/pci/pci-hotplug-old.c
index e92d6467be..807260cce9 100644
--- a/hw/pci/pci-hotplug-old.c
+++ b/hw/pci/pci-hotplug-old.c
@@ -92,7 +92,8 @@ static PCIDevice *qemu_pci_hot_add_nic(Monitor *mon,
monitor_printf(mon, "Parameter addr not supported\n");
return NULL;
}
- return pci_nic_init(&nd_table[ret], "rtl8139", devaddr);
+ return pci_nic_init(&nd_table[ret], pci_find_primary_bus(),
+ "rtl8139", devaddr);
}
static int scsi_hot_add(Monitor *mon, DeviceState *adapter,