[libvirt] [PATCH] qemu: add PCI-multibus support for ppc

Hong-Hua.Yin at freescale.com Hong-Hua.Yin at freescale.com
Wed Mar 5 03:07:57 UTC 2014


Jan, thanks a lot for your comments.

Olivia

> -----Original Message-----
> From: Ján Tomko [mailto:jtomko at redhat.com]
> Sent: Tuesday, March 04, 2014 10:43 PM
> To: Yin Olivia-R63875; Daniel P. Berrange
> Cc: libvir-list at redhat.com
> Subject: Re: [libvirt] [PATCH] qemu: add PCI-multibus support for ppc
> 
> On 02/28/2014 10:10 AM, Hong-Hua.Yin at freescale.com wrote:
> > Hi Daniel,
> >
> > Refer to libvirt/src/qemu/qemu_capabilities.c, only x86_64/i686 support
> PCI_MULTIBUS.
> >     /* Currently only x86_64 and i686 support PCI-multibus. */
> >     if (qemuCaps->arch == VIR_ARCH_X86_64 ||
> >         qemuCaps->arch == VIR_ARCH_I686) {
> >         virQEMUCapsSet(qemuCaps, QEMU_CAPS_PCI_MULTIBUS);
> >
> > libvirt/src/qemu/qemu_capabilities.h:
> >     QEMU_CAPS_PCI_MULTIBUS       = 52, /* bus=pci.0 vs bus=pci */
> >
> >
> > Exactly there're several PowerPC platforms also use pci.0 as PCI bus name.
> > $ grep -r "pci\.0"  qemu/hw/
> > qemu/hw/ppc/prep.c:    pci_bus = (PCIBus *)qdev_get_child_bus(dev,
> "pci.0");
> > qemu/hw/ppc/e500.c:    pci_bus = (PCIBus *)qdev_get_child_bus(dev,
> "pci.0");
> > qemu/hw/ppc/ppc440_bamboo.c:    pcibus = (PCIBus *)qdev_get_child_bus(dev,
> "pci.0");
> >
> 
> Looking at 'info qtree' output it seems "pseries" is the only PPC machine
> type using "pci" (out of those I managed to run):
> ppce500
>     bus: pci.0
> mac99
>     bus: pci.0
> g3beige
>     bus: pci.0
> mpc8544ds
>     bus: pci.0
> ref405ep
> qemu-system-ppc64: Could not load PowerPC BIOS 'ppc405_rom.bin'
> taihu
> qemu-system-ppc64: Could not load PowerPC BIOS 'ppc405_rom.bin'
> bamboo
>     bus: pci.0
> prep
>     bus: pci.0
> pseries
> Warning: Disabling some instructions which are not emulated by TCG (0x0,
> 0x4)
>     bus: pci
> virtex-ml507
> 
> > There's no much platform specific code in libvirt.
> > How can we get the exact PCI bus name and make "pci.0" work on the above
> PowerPC platforms?
> 
> I think we need to check the def->os.machine string on PPC, since we only
> probe a particular QEMU binary, not every machine type it supports.
> 
> Jan





More information about the libvir-list mailing list