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");
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?
Best Regards,
Olivia
-----Original Message-----
From: Daniel P. Berrange [mailto:berrange@redhat.com]
Sent: Wednesday, March 20, 2013 7:04 PM
To: Yin Olivia-R63875
Cc: libvir-list(a)redhat.com
Subject: Re: [PATCH] qemu: add PCI-multibus support for ppc
On Wed, Mar 20, 2013 at 02:11:51AM +0000, Yin Olivia-R63875 wrote:
> Hi Daniel,
>
> PPC also supports PCI multibus. Could you please help review this patch?
IIUC, PPC did not support PCI multibus in the past, so when did this
change ? Libvirt needs to only use this for versions where it is supported,
so unconditionally enabling it for all PPC is not right.
> > -----Original Message-----
> > From: Yin Olivia-R63875
> > Sent: Wednesday, March 13, 2013 12:44 PM
> > To: libvir-list(a)redhat.com
> > Cc: Yin Olivia-R63875
> > Subject: [PATCH] qemu: add PCI-multibus support for ppc
> >
> > Signed-off-by: Olivia Yin <hong-hua.yin(a)freescale.com>
> > ---
> > src/qemu/qemu_capabilities.c | 10 ++++++++++
> > 1 files changed, 10 insertions(+), 0 deletions(-)
> >
> > diff --git a/src/qemu/qemu_capabilities.c
> > b/src/qemu/qemu_capabilities.c index 7bc1ebc..7d7791d 100644
> > --- a/src/qemu/qemu_capabilities.c
> > +++ b/src/qemu/qemu_capabilities.c
> > @@ -2209,6 +2209,11 @@ virQEMUCapsInitHelp(virQEMUCapsPtr qemuCaps,
> > uid_t runUid, gid_t runGid)
> > virQEMUCapsClear(qemuCaps, QEMU_CAPS_NO_ACPI);
> > }
> >
> > + /* ppc support PCI-multibus */
> > + if (qemuCaps->arch == VIR_ARCH_PPC) {
> > + virQEMUCapsSet(qemuCaps, QEMU_CAPS_PCI_MULTIBUS);
> > + }
> > +
> > /* virQEMUCapsExtractDeviceStr will only set additional caps if
qemu
> > * understands the 0.13.0+ notion of "-device driver,". */
> > if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE) && @@ -2450,6
> > +2455,11 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps,
> > virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_ACPI);
> > }
> >
> > + /* ppc support PCI-multibus */
> > + if (qemuCaps->arch == VIR_ARCH_PPC) {
> > + virQEMUCapsSet(qemuCaps, QEMU_CAPS_PCI_MULTIBUS);
> > + }
> > +
> > if (virQEMUCapsProbeQMPCommands(qemuCaps, mon) < 0)
> > goto cleanup;
> > if (virQEMUCapsProbeQMPEvents(qemuCaps, mon) < 0)
> > --
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-
manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-
vnc :|