diff options
author | Alexey Kardashevskiy <aik@ozlabs.ru> | 2014-03-06 14:11:00 +1100 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2014-03-12 20:13:02 +0100 |
commit | 1b8601b0ea0b91467561e0bbddd52a833e4b2b1a (patch) | |
tree | ff4cdd2b0a59f2c66ca9cb3e3ccd2121239c11e6 /hw/ppc/spapr_pci.c | |
parent | cdccf7d7e7f16046cdb192423323a42ad7f43bec (diff) |
spapr-pci: Change the default PCI bus naming
Previously libvirt required the first/default PCI bus to have name "pci".
Since QEMU can support multiple buses now, libvirt wants "pci.0" now.
This removes custom bus name and lets QEMU make up default names.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/ppc/spapr_pci.c')
-rw-r--r-- | hw/ppc/spapr_pci.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index cea9469872..3063109e21 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -510,7 +510,6 @@ static int spapr_phb_init(SysBusDevice *s) DeviceState *dev = DEVICE(s); sPAPRPHBState *sphb = SPAPR_PCI_HOST_BRIDGE(s); PCIHostState *phb = PCI_HOST_BRIDGE(s); - const char *busname; char *namebuf; int i; PCIBus *bus; @@ -594,26 +593,8 @@ static int spapr_phb_init(SysBusDevice *s) get_system_io(), 0, SPAPR_PCI_IO_WIN_SIZE); memory_region_add_subregion(get_system_memory(), sphb->io_win_addr, &sphb->iowindow); - /* - * Selecting a busname is more complex than you'd think, due to - * interacting constraints. If the user has specified an id - * explicitly for the phb , then we want to use the qdev default - * of naming the bus based on the bridge device (so the user can - * then assign devices to it in the way they expect). For the - * first / default PCI bus (index=0) we want to use just "pci" - * because libvirt expects there to be a bus called, simply, - * "pci". Otherwise, we use the same name as in the device tree, - * since it's unique by construction, and makes the guest visible - * BUID clear. - */ - if (dev->id) { - busname = NULL; - } else if (sphb->index == 0) { - busname = "pci"; - } else { - busname = sphb->dtbusname; - } - bus = pci_register_bus(dev, busname, + + bus = pci_register_bus(dev, NULL, pci_spapr_set_irq, pci_spapr_map_irq, sphb, &sphb->memspace, &sphb->iospace, PCI_DEVFN(0, 0), PCI_NUM_PINS, TYPE_PCI_BUS); |