Re: [libvirt] [PATCH] qemu: add PCI-multibus support for ppc
Daniel, I got it. We need do machine detection for the special PPC platforms. Thank you for comments. Olivia > -Original Message- > From: Daniel P. Berrange [mailto:berra...@redhat.com] > Sent: Tuesday, March 04, 2014 10:53 PM > To: Yin Olivia-R63875 > Cc: libvir-list@redhat.com > Subject: Re: [PATCH] qemu: add PCI-multibus support for ppc > > On Fri, Feb 28, 2014 at 09:10:47AM +, hong-hua@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"); > > > > 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? > > As I said in my previous comments, if PPC is now using 'pci.0' as the bus > name, this is a change from previous QEMU behaviour. If you just make > libvirt use 'pci.0' for all PPC arches you will be breaking compatibility > with old QEMU versions. You must therefore do proper version detection for > this. > > Regards, > 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 :| > -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemu: add PCI-multibus support for ppc
Jan, thanks a lot for your comments. Olivia > -Original Message- > From: Ján Tomko [mailto:jto...@redhat.com] > Sent: Tuesday, March 04, 2014 10:43 PM > To: Yin Olivia-R63875; Daniel P. Berrange > Cc: libvir-list@redhat.com > Subject: Re: [libvirt] [PATCH] qemu: add PCI-multibus support for ppc > > On 02/28/2014 10:10 AM, hong-hua@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 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemu: add PCI-multibus support for ppc
On Fri, Feb 28, 2014 at 09:10:47AM +, hong-hua@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"); > > 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? As I said in my previous comments, if PPC is now using 'pci.0' as the bus name, this is a change from previous QEMU behaviour. If you just make libvirt use 'pci.0' for all PPC arches you will be breaking compatibility with old QEMU versions. You must therefore do proper version detection for this. Regards, 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 :| -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemu: add PCI-multibus support for ppc
On 02/28/2014 10:10 AM, hong-hua@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 signature.asc Description: OpenPGP digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemu: add PCI-multibus support for ppc
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:berra...@redhat.com] > Sent: Wednesday, March 20, 2013 7:04 PM > To: Yin Olivia-R63875 > Cc: libvir-list@redhat.com > Subject: Re: [PATCH] qemu: add PCI-multibus support for ppc > > On Wed, Mar 20, 2013 at 02:11:51AM +, 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@redhat.com > > > Cc: Yin Olivia-R63875 > > > Subject: [PATCH] qemu: add PCI-multibus support for ppc > > > > > > Signed-off-by: Olivia Yin > > > --- > > > 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 :| -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemu: add PCI-multibus support for ppc
On Wed, Mar 20, 2013 at 02:11:51AM +, 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@redhat.com > > Cc: Yin Olivia-R63875 > > Subject: [PATCH] qemu: add PCI-multibus support for ppc > > > > Signed-off-by: Olivia Yin > > --- > > 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 :| -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemu: add PCI-multibus support for ppc
Hi Daniel, PPC also supports PCI multibus. Could you please help review this patch? Best Regards, Olivia > -Original Message- > From: Yin Olivia-R63875 > Sent: Wednesday, March 13, 2013 12:44 PM > To: libvir-list@redhat.com > Cc: Yin Olivia-R63875 > Subject: [PATCH] qemu: add PCI-multibus support for ppc > > Signed-off-by: Olivia Yin > --- > 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) > -- > 1.6.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH] qemu: add PCI-multibus support for ppc
Signed-off-by: Olivia Yin --- 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) -- 1.6.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list