Received: from eggs.gnu.org ([2001:4830:134:3::10]:60503) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNqPl-00082E-N2 for qemu-devel@nongnu.org; Wed, 12 Mar 2014 17:10:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WNqPe-0008Tz-Qk for qemu-devel@nongnu.org; Wed, 12 Mar 2014 17:10:13 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 12 Mar 2014 22:09:43 +0100 Message-Id: <1394658603-13650-12-git-send-email-afaerber@suse.de> In-Reply-To: <1394658603-13650-1-git-send-email-afaerber@suse.de> References: <1394658603-13650-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL for-2.0-rc0 11/31] spapr-pci: Change the default PCI bus naming List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexey Kardashevskiy , "open list:sPAPR" , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Alexander Graf From: Alexey Kardashevskiy 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 Signed-off-by: Andreas F=C3=A4rber --- hw/ppc/spapr_pci.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index cea9469..3063109 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 =3D DEVICE(s); sPAPRPHBState *sphb =3D SPAPR_PCI_HOST_BRIDGE(s); PCIHostState *phb =3D 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=3D0) 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 =3D NULL; - } else if (sphb->index =3D=3D 0) { - busname =3D "pci"; - } else { - busname =3D sphb->dtbusname; - } - bus =3D pci_register_bus(dev, busname, + + bus =3D 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); --=20 1.8.4.5