diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2013-06-06 18:48:51 +1000 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2013-07-07 23:10:57 +0300 |
commit | 29b358f93a48a415853d11fc9b02f711b5ec8f76 (patch) | |
tree | b09d6014da1942fe62614830996552dec90fd18d /hw/ppc | |
parent | 85c6e4fabb4c26e5cd8a024415ed2f5bcdd578db (diff) |
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/ppc')
-rw-r--r-- | hw/ppc/e500.c | 2 | ||||
-rw-r--r-- | hw/ppc/mac_newworld.c | 2 | ||||
-rw-r--r-- | hw/ppc/mac_oldworld.c | 2 | ||||
-rw-r--r-- | hw/ppc/ppc440_bamboo.c | 2 | ||||
-rw-r--r-- | hw/ppc/prep.c | 2 | ||||
-rw-r--r-- | hw/ppc/spapr.c | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 38f799031a..75b05a21fc 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -707,7 +707,7 @@ void ppce500_init(PPCE500Params *params) if (pci_bus) { /* Register network interfaces. */ for (i = 0; i < nb_nics; i++) { - pci_nic_init_nofail(&nd_table[i], "virtio", NULL); + pci_nic_init_nofail(&nd_table[i], pci_bus, "virtio", NULL); } } diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index 3badfa3adb..98b902e5af 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -375,7 +375,7 @@ static void ppc_core99_init(QEMUMachineInitArgs *args) escc_mem, 0, memory_region_size(escc_mem)); for(i = 0; i < nb_nics; i++) - pci_nic_init_nofail(&nd_table[i], "ne2k_pci", NULL); + pci_nic_init_nofail(&nd_table[i], pci_bus, "ne2k_pci", NULL); ide_drive_get(hd, MAX_IDE_BUS); diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c index 8faff300ff..1d73a73e94 100644 --- a/hw/ppc/mac_oldworld.c +++ b/hw/ppc/mac_oldworld.c @@ -259,7 +259,7 @@ static void ppc_heathrow_init(QEMUMachineInitArgs *args) escc_mem, 0, memory_region_size(escc_mem)); for(i = 0; i < nb_nics; i++) - pci_nic_init_nofail(&nd_table[i], "ne2k_pci", NULL); + pci_nic_init_nofail(&nd_table[i], pci_bus, "ne2k_pci", NULL); ide_drive_get(hd, MAX_IDE_BUS); diff --git a/hw/ppc/ppc440_bamboo.c b/hw/ppc/ppc440_bamboo.c index b0c1c027d4..5b039abb38 100644 --- a/hw/ppc/ppc440_bamboo.c +++ b/hw/ppc/ppc440_bamboo.c @@ -243,7 +243,7 @@ static void bamboo_init(QEMUMachineInitArgs *args) for (i = 0; i < nb_nics; i++) { /* There are no PCI NICs on the Bamboo board, but there are * PCI slots, so we can pick whatever default model we want. */ - pci_nic_init_nofail(&nd_table[i], "e1000", NULL); + pci_nic_init_nofail(&nd_table[i], pcibus, "e1000", NULL); } } diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index 90828f2635..f674ab7079 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -628,7 +628,7 @@ static void ppc_prep_init(QEMUMachineInitArgs *args) isa_ne2000_init(isa_bus, ne2000_io[i], ne2000_irq[i], &nd_table[i]); } else { - pci_nic_init_nofail(&nd_table[i], "ne2k_pci", NULL); + pci_nic_init_nofail(&nd_table[i], pci_bus, "ne2k_pci", NULL); } } diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index fe34291ffd..e2183d34a9 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -887,7 +887,7 @@ static void ppc_spapr_init(QEMUMachineInitArgs *args) if (strcmp(nd->model, "ibmveth") == 0) { spapr_vlan_create(spapr->vio_bus, nd); } else { - pci_nic_init_nofail(&nd_table[i], nd->model, NULL); + pci_nic_init_nofail(&nd_table[i], phb->bus, nd->model, NULL); } } |