qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] QEMU: PCI bus name on PowerPC platforms
@ 2014-03-05 10:42 Hong-Hua.Yin
  2014-03-05 11:43 ` Alexey Kardashevskiy
  0 siblings, 1 reply; 20+ messages in thread
From: Hong-Hua.Yin @ 2014-03-05 10:42 UTC (permalink / raw)
  To: david@gibson.dropbear.id.au, agraf@suse.de, aik@ozlabs.ru,
	Hong-Hua.Yin@freescale.com
  Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org

Hi Gibson,

I noticed your patch http://git.qemu.org/?p=qemu.git;a=commitdiff;h=89dfd6e1
and have some question about PCI bus name on PowerPC.

When I use libvirt to start VM on PowerPC platforms, it failed as below: 
# virsh start sdk
error: Failed to start domain sdk
error: internal error: early end of file from monitor: possible problem:
qemu-system-ppc: -device piix3-usb-uhci,id=usb,bus=pci,addr=0x1: Bus 'pci' not found

Exactly it should be 'pci.0' according to the default qdev core logic.

But currently in libvirt it only recognize PCI bus name as 'pci.0' on x86_64/i686 Arch.
-------------------------------------------------------------------
libvirt/src/qemu/qemu_capabilities.c
    /* 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 */
-------------------------------------------------------------------

Looking at 'info qtree' output it seems "pseries" is the only PPC machine type 
using "pci" (out of those we managed to run):

$ ./ppc64-softmmu/qemu-system-ppc64 -M ?
Supported machines are:
virtex-ml507         Xilinx Virtex ML507 reference design
pseries              pSeries Logical Partition (PAPR compliant) (default)
prep                 PowerPC PREP platform
bamboo               bamboo
ref405ep             ref405ep
taihu                taihu
mpc8544ds            mpc8544ds
g3beige              Heathrow based PowerMAC
mac99                Mac99 based PowerMAC
ppce500              generic paravirt e500 platform
none                 empty machine

1) virtex-ml507
2) pseries
Warning: Disabling some instructions which are not emulated by TCG (0x0, 0x4)
    bus: pci
3) prep
    bus: pci.0
4) bamboo
    bus: pci.0
5) ref405ep
qemu-system-ppc64: Could not load PowerPC BIOS 'ppc405_rom.bin'
6) taihu
qemu-system-ppc64: Could not load PowerPC BIOS 'ppc405_rom.bin'
7) mpc8544ds
    bus: pci.0
8) g3beige
    bus: pci.0
9) mac99
    bus: pci.0
10) ppce500
    bus: pci.0


Could pseries also use 'pci.0' as PCI bus name? 
If yes, could we set QEMU_CAPS_PCI_MULTIBUS in libvirt for all the 
PowerPC platforms? Otherwise, we need detect the machine to fix this issue.

The discussion in libvirt mailing list is here:
https://www.redhat.com/archives/libvir-list/2014-March/msg00228.html

I think we need reach an agreement in QEMU and then work on libvirt.

Best Regards,
Olivia

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] QEMU: PCI bus name on PowerPC platforms
  2014-03-05 10:42 [Qemu-devel] QEMU: PCI bus name on PowerPC platforms Hong-Hua.Yin
@ 2014-03-05 11:43 ` Alexey Kardashevskiy
  2014-03-05 13:35   ` Paolo Bonzini
  0 siblings, 1 reply; 20+ messages in thread
From: Alexey Kardashevskiy @ 2014-03-05 11:43 UTC (permalink / raw)
  To: Hong-Hua.Yin@freescale.com, david@gibson.dropbear.id.au,
	agraf@suse.de
  Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Li Zhang

On 03/05/2014 09:42 PM, Hong-Hua.Yin@freescale.com wrote:
> Hi Gibson,
> 
> I noticed your patch http://git.qemu.org/?p=qemu.git;a=commitdiff;h=89dfd6e1
> and have some question about PCI bus name on PowerPC.
> 
> When I use libvirt to start VM on PowerPC platforms, it failed as below: 
> # virsh start sdk
> error: Failed to start domain sdk
> error: internal error: early end of file from monitor: possible problem:
> qemu-system-ppc: -device piix3-usb-uhci,id=usb,bus=pci,addr=0x1: Bus 'pci' not found



I just tried current upstresm QEMU and it handles bus=pci fine, it prints
an error on bus=pci.0 so I am confused - what qemu are you trying?

I am adding our libvirt developer Li, she might help with this.


> Exactly it should be 'pci.0' according to the default qdev core logic.
> 
> But currently in libvirt it only recognize PCI bus name as 'pci.0' on x86_64/i686 Arch.
> -------------------------------------------------------------------
> libvirt/src/qemu/qemu_capabilities.c
>     /* 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 */
> -------------------------------------------------------------------
>
> Looking at 'info qtree' output it seems "pseries" is the only PPC machine type 
> using "pci" (out of those we managed to run):
> 
> $ ./ppc64-softmmu/qemu-system-ppc64 -M ?
> Supported machines are:
> virtex-ml507         Xilinx Virtex ML507 reference design
> pseries              pSeries Logical Partition (PAPR compliant) (default)
> prep                 PowerPC PREP platform
> bamboo               bamboo
> ref405ep             ref405ep
> taihu                taihu
> mpc8544ds            mpc8544ds
> g3beige              Heathrow based PowerMAC
> mac99                Mac99 based PowerMAC
> ppce500              generic paravirt e500 platform
> none                 empty machine
> 
> 1) virtex-ml507
> 2) pseries
> Warning: Disabling some instructions which are not emulated by TCG (0x0, 0x4)
>     bus: pci
> 3) prep
>     bus: pci.0
> 4) bamboo
>     bus: pci.0
> 5) ref405ep
> qemu-system-ppc64: Could not load PowerPC BIOS 'ppc405_rom.bin'
> 6) taihu
> qemu-system-ppc64: Could not load PowerPC BIOS 'ppc405_rom.bin'
> 7) mpc8544ds
>     bus: pci.0
> 8) g3beige
>     bus: pci.0
> 9) mac99
>     bus: pci.0
> 10) ppce500
>     bus: pci.0
> 
> 
> Could pseries also use 'pci.0' as PCI bus name? 
> If yes, could we set QEMU_CAPS_PCI_MULTIBUS in libvirt for all the 
> PowerPC platforms? Otherwise, we need detect the machine to fix this issue.
> 
> The discussion in libvirt mailing list is here:
> https://www.redhat.com/archives/libvir-list/2014-March/msg00228.html
> 
> I think we need reach an agreement in QEMU and then work on libvirt.
	>
> Best Regards,
> Olivia
> 


-- 
Alexey

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] QEMU: PCI bus name on PowerPC platforms
  2014-03-05 11:43 ` Alexey Kardashevskiy
@ 2014-03-05 13:35   ` Paolo Bonzini
  2014-03-05 13:40     ` Daniel P. Berrange
  2014-03-05 15:15     ` Alexey Kardashevskiy
  0 siblings, 2 replies; 20+ messages in thread
From: Paolo Bonzini @ 2014-03-05 13:35 UTC (permalink / raw)
  To: Alexey Kardashevskiy, Hong-Hua.Yin@freescale.com,
	david@gibson.dropbear.id.au, agraf@suse.de
  Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Li Zhang

Il 05/03/2014 12:43, Alexey Kardashevskiy ha scritto:
>
> I just tried current upstresm QEMU and it handles bus=pci fine, it prints
> an error on bus=pci.0 so I am confused - what qemu are you trying?

See below:

1) virtex-ml507
2) pseries
Warning: Disabling some instructions which are not emulated by TCG (0x0, 
0x4)
     bus: pci
3) prep
     bus: pci.0
4) bamboo
     bus: pci.0
5) ref405ep
qemu-system-ppc64: Could not load PowerPC BIOS 'ppc405_rom.bin'
6) taihu
qemu-system-ppc64: Could not load PowerPC BIOS 'ppc405_rom.bin'
7) mpc8544ds
     bus: pci.0
8) g3beige
     bus: pci.0
9) mac99
     bus: pci.0
10) ppce500
     bus: pci.0

pseries is the odd one, I think the right thing to do is for QEMU to 
change the bus name incompatibly, and libvirt to cope with it.

Paolo

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] QEMU: PCI bus name on PowerPC platforms
  2014-03-05 13:35   ` Paolo Bonzini
@ 2014-03-05 13:40     ` Daniel P. Berrange
  2014-03-05 14:12       ` Paolo Bonzini
  2014-03-05 15:15     ` Alexey Kardashevskiy
  1 sibling, 1 reply; 20+ messages in thread
From: Daniel P. Berrange @ 2014-03-05 13:40 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Hong-Hua.Yin@freescale.com, Alexey Kardashevskiy,
	qemu-devel@nongnu.org, Li Zhang, agraf@suse.de,
	qemu-ppc@nongnu.org, david@gibson.dropbear.id.au

On Wed, Mar 05, 2014 at 02:35:17PM +0100, Paolo Bonzini wrote:
> Il 05/03/2014 12:43, Alexey Kardashevskiy ha scritto:
> >
> >I just tried current upstresm QEMU and it handles bus=pci fine, it prints
> >an error on bus=pci.0 so I am confused - what qemu are you trying?
> 
> See below:
> 
> 1) virtex-ml507
> 2) pseries
> Warning: Disabling some instructions which are not emulated by TCG
> (0x0, 0x4)
>     bus: pci
> 3) prep
>     bus: pci.0
> 4) bamboo
>     bus: pci.0
> 5) ref405ep
> qemu-system-ppc64: Could not load PowerPC BIOS 'ppc405_rom.bin'
> 6) taihu
> qemu-system-ppc64: Could not load PowerPC BIOS 'ppc405_rom.bin'
> 7) mpc8544ds
>     bus: pci.0
> 8) g3beige
>     bus: pci.0
> 9) mac99
>     bus: pci.0
> 10) ppce500
>     bus: pci.0
> 
> pseries is the odd one, I think the right thing to do is for QEMU to
> change the bus name incompatibly, and libvirt to cope with it.

If we're going to do that please make sure to change every machine type
in QEMU to use pci.0 as a standard, not just PPC.

FWIW, I had requested this rename in the past but it was rejected :-(

   http://comments.gmane.org/gmane.comp.emulators.qemu/70783

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 :|

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] QEMU: PCI bus name on PowerPC platforms
  2014-03-05 13:40     ` Daniel P. Berrange
@ 2014-03-05 14:12       ` Paolo Bonzini
  2014-03-05 14:21         ` Daniel P. Berrange
  0 siblings, 1 reply; 20+ messages in thread
From: Paolo Bonzini @ 2014-03-05 14:12 UTC (permalink / raw)
  To: Daniel P. Berrange
  Cc: Hong-Hua.Yin@freescale.com, Alexey Kardashevskiy,
	qemu-devel@nongnu.org, Li Zhang, agraf@suse.de,
	qemu-ppc@nongnu.org, david@gibson.dropbear.id.au

Il 05/03/2014 14:40, Daniel P. Berrange ha scritto:
> FWIW, I had requested this rename in the past but it was rejected :-(
> 
>    http://comments.gmane.org/gmane.comp.emulators.qemu/70783

I think we should revisit that.

Path-based bus names are a good idea, but unfortunately it's not how 
things ended up working.

We now have two namespaces:

- one based on the device id + incremental number, where things created
by the user can be addressed in a forwards-compatible way

- another based on the bus type as soon as Alex/Markus's patch "qdev:
Keep global allocation counter per bus", for things created by the board
(and also by the user, but with no forwards guarantee of compatibility).

So we could respin your patch, but with NULL bus name instead of "pci.0".
Just a handful of machines are affected:

alpha/typhoon.c:    b = pci_register_bus(dev, "pci",
mips/gt64xxx_pci.c:     phb->bus = pci_register_bus(dev, "pci",
pci-host/apb.c:    phb->bus = pci_register_bus(DEVICE(phb), "pci",
pci-host/bonito.c:    phb->bus = pci_register_bus(DEVICE(dev), "pci",
sh4/sh_pci.c:    phb->bus = pci_register_bus(DEVICE(dev), "pci",
pci-host/versatile.c:    pci_bus_new_inplace(&s->pci_bus, sizeof(s->pci_bus), DEVICE(obj), "pci",

plus pseries which has its own rules because it supports multiple PCI
host bridges, but probably can also be changed from "pci" to NULL.

Paolo

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] QEMU: PCI bus name on PowerPC platforms
  2014-03-05 14:12       ` Paolo Bonzini
@ 2014-03-05 14:21         ` Daniel P. Berrange
  2014-03-05 14:33           ` Paolo Bonzini
  2014-03-05 14:35           ` Andreas Färber
  0 siblings, 2 replies; 20+ messages in thread
From: Daniel P. Berrange @ 2014-03-05 14:21 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Hong-Hua.Yin@freescale.com, Alexey Kardashevskiy,
	qemu-devel@nongnu.org, Li Zhang, agraf@suse.de,
	qemu-ppc@nongnu.org, david@gibson.dropbear.id.au

On Wed, Mar 05, 2014 at 03:12:40PM +0100, Paolo Bonzini wrote:
> Il 05/03/2014 14:40, Daniel P. Berrange ha scritto:
> > FWIW, I had requested this rename in the past but it was rejected :-(
> > 
> >    http://comments.gmane.org/gmane.comp.emulators.qemu/70783
> 
> I think we should revisit that.
> 
> Path-based bus names are a good idea, but unfortunately it's not how 
> things ended up working.
> 
> We now have two namespaces:
> 
> - one based on the device id + incremental number, where things created
> by the user can be addressed in a forwards-compatible way
> 
> - another based on the bus type as soon as Alex/Markus's patch "qdev:
> Keep global allocation counter per bus", for things created by the board
> (and also by the user, but with no forwards guarantee of compatibility).
> 
> So we could respin your patch, but with NULL bus name instead of "pci.0".
> Just a handful of machines are affected:
> 
> alpha/typhoon.c:    b = pci_register_bus(dev, "pci",
> mips/gt64xxx_pci.c:     phb->bus = pci_register_bus(dev, "pci",
> pci-host/apb.c:    phb->bus = pci_register_bus(DEVICE(phb), "pci",
> pci-host/bonito.c:    phb->bus = pci_register_bus(DEVICE(dev), "pci",
> sh4/sh_pci.c:    phb->bus = pci_register_bus(DEVICE(dev), "pci",
> pci-host/versatile.c:    pci_bus_new_inplace(&s->pci_bus, sizeof(s->pci_bus), DEVICE(obj), "pci",
> 
> plus pseries which has its own rules because it supports multiple PCI
> host bridges, but probably can also be changed from "pci" to NULL.

I'm not sure I understand the effect of changing 'pci' to NULL in this
code, from libvirt's POV. Would using NULL mean we can rely on using
"pci.0" as the default PCI bus name or not ?

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 :|

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] QEMU: PCI bus name on PowerPC platforms
  2014-03-05 14:21         ` Daniel P. Berrange
@ 2014-03-05 14:33           ` Paolo Bonzini
  2014-03-05 14:40             ` Daniel P. Berrange
  2014-04-10  9:24             ` Daniel P. Berrange
  2014-03-05 14:35           ` Andreas Färber
  1 sibling, 2 replies; 20+ messages in thread
From: Paolo Bonzini @ 2014-03-05 14:33 UTC (permalink / raw)
  To: Daniel P. Berrange
  Cc: Hong-Hua.Yin@freescale.com, Alexey Kardashevskiy,
	qemu-devel@nongnu.org, Li Zhang, agraf@suse.de,
	qemu-ppc@nongnu.org, david@gibson.dropbear.id.au

Il 05/03/2014 15:21, Daniel P. Berrange ha scritto:
>> alpha/typhoon.c:    b = pci_register_bus(dev, "pci",
>> mips/gt64xxx_pci.c:     phb->bus = pci_register_bus(dev, "pci",
>> pci-host/apb.c:    phb->bus = pci_register_bus(DEVICE(phb), "pci",
>> pci-host/bonito.c:    phb->bus = pci_register_bus(DEVICE(dev), "pci",
>> sh4/sh_pci.c:    phb->bus = pci_register_bus(DEVICE(dev), "pci",
>> pci-host/versatile.c:    pci_bus_new_inplace(&s->pci_bus, sizeof(s->pci_bus), DEVICE(obj), "pci",
>>
>> plus pseries which has its own rules because it supports multiple PCI
>> host bridges, but probably can also be changed from "pci" to NULL.
>
> I'm not sure I understand the effect of changing 'pci' to NULL in this
> code, from libvirt's POV. Would using NULL mean we can rely on using
> "pci.0" as the default PCI bus name or not ?

Yes.  But the next bus that the user creates (e.g. from a PCI bridge 
without an "id") would be "pci.1" instead of having a duplicate 
"pci.0").  Needs a bit more testing of course.

Paolo

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] QEMU: PCI bus name on PowerPC platforms
  2014-03-05 14:21         ` Daniel P. Berrange
  2014-03-05 14:33           ` Paolo Bonzini
@ 2014-03-05 14:35           ` Andreas Färber
  2014-03-05 14:38             ` Andreas Färber
  1 sibling, 1 reply; 20+ messages in thread
From: Andreas Färber @ 2014-03-05 14:35 UTC (permalink / raw)
  To: Daniel P. Berrange, Paolo Bonzini
  Cc: Hong-Hua.Yin@freescale.com, Alexey Kardashevskiy,
	qemu-devel@nongnu.org, Li Zhang, agraf@suse.de,
	qemu-ppc@nongnu.org, david@gibson.dropbear.id.au

Am 05.03.2014 15:21, schrieb Daniel P. Berrange:
> On Wed, Mar 05, 2014 at 03:12:40PM +0100, Paolo Bonzini wrote:
>> Il 05/03/2014 14:40, Daniel P. Berrange ha scritto:
>>> FWIW, I had requested this rename in the past but it was rejected :-(
>>>
>>>    http://comments.gmane.org/gmane.comp.emulators.qemu/70783
>>
>> I think we should revisit that.
>>
>> Path-based bus names are a good idea, but unfortunately it's not how 
>> things ended up working.
>>
>> We now have two namespaces:
>>
>> - one based on the device id + incremental number, where things created
>> by the user can be addressed in a forwards-compatible way
>>
>> - another based on the bus type as soon as Alex/Markus's patch "qdev:
>> Keep global allocation counter per bus", for things created by the board
>> (and also by the user, but with no forwards guarantee of compatibility).
>>
>> So we could respin your patch, but with NULL bus name instead of "pci.0".
>> Just a handful of machines are affected:
>>
>> alpha/typhoon.c:    b = pci_register_bus(dev, "pci",
>> mips/gt64xxx_pci.c:     phb->bus = pci_register_bus(dev, "pci",
>> pci-host/apb.c:    phb->bus = pci_register_bus(DEVICE(phb), "pci",
>> pci-host/bonito.c:    phb->bus = pci_register_bus(DEVICE(dev), "pci",
>> sh4/sh_pci.c:    phb->bus = pci_register_bus(DEVICE(dev), "pci",
>> pci-host/versatile.c:    pci_bus_new_inplace(&s->pci_bus, sizeof(s->pci_bus), DEVICE(obj), "pci",
>>
>> plus pseries which has its own rules because it supports multiple PCI
>> host bridges, but probably can also be changed from "pci" to NULL.
> 
> I'm not sure I understand the effect of changing 'pci' to NULL in this
> code, from libvirt's POV. Would using NULL mean we can rely on using
> "pci.0" as the default PCI bus name or not ?

I believe so, yes. See
https://github.com/afaerber/qemu-cpu/commit/ce1c9b4302a4458e73ae6a6a13f4e4ee121f79ea

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] QEMU: PCI bus name on PowerPC platforms
  2014-03-05 14:35           ` Andreas Färber
@ 2014-03-05 14:38             ` Andreas Färber
  2014-03-05 14:44               ` Paolo Bonzini
  0 siblings, 1 reply; 20+ messages in thread
From: Andreas Färber @ 2014-03-05 14:38 UTC (permalink / raw)
  To: Daniel P. Berrange, Paolo Bonzini
  Cc: Hong-Hua.Yin@freescale.com, Alexey Kardashevskiy,
	qemu-devel@nongnu.org, Li Zhang, agraf@suse.de,
	qemu-ppc@nongnu.org, david@gibson.dropbear.id.au

Am 05.03.2014 15:35, schrieb Andreas Färber:
> Am 05.03.2014 15:21, schrieb Daniel P. Berrange:
>> On Wed, Mar 05, 2014 at 03:12:40PM +0100, Paolo Bonzini wrote:
>>> Il 05/03/2014 14:40, Daniel P. Berrange ha scritto:
>>>> FWIW, I had requested this rename in the past but it was rejected :-(
>>>>
>>>>    http://comments.gmane.org/gmane.comp.emulators.qemu/70783
>>>
>>> I think we should revisit that.
>>>
>>> Path-based bus names are a good idea, but unfortunately it's not how 
>>> things ended up working.
>>>
>>> We now have two namespaces:
>>>
>>> - one based on the device id + incremental number, where things created
>>> by the user can be addressed in a forwards-compatible way
>>>
>>> - another based on the bus type as soon as Alex/Markus's patch "qdev:
>>> Keep global allocation counter per bus", for things created by the board
>>> (and also by the user, but with no forwards guarantee of compatibility).
>>>
>>> So we could respin your patch, but with NULL bus name instead of "pci.0".
>>> Just a handful of machines are affected:
>>>
>>> alpha/typhoon.c:    b = pci_register_bus(dev, "pci",
>>> mips/gt64xxx_pci.c:     phb->bus = pci_register_bus(dev, "pci",
>>> pci-host/apb.c:    phb->bus = pci_register_bus(DEVICE(phb), "pci",
>>> pci-host/bonito.c:    phb->bus = pci_register_bus(DEVICE(dev), "pci",
>>> sh4/sh_pci.c:    phb->bus = pci_register_bus(DEVICE(dev), "pci",
>>> pci-host/versatile.c:    pci_bus_new_inplace(&s->pci_bus, sizeof(s->pci_bus), DEVICE(obj), "pci",
>>>
>>> plus pseries which has its own rules because it supports multiple PCI
>>> host bridges, but probably can also be changed from "pci" to NULL.
>>
>> I'm not sure I understand the effect of changing 'pci' to NULL in this
>> code, from libvirt's POV. Would using NULL mean we can rely on using
>> "pci.0" as the default PCI bus name or not ?
> 
> I believe so, yes. See
> https://github.com/afaerber/qemu-cpu/commit/ce1c9b4302a4458e73ae6a6a13f4e4ee121f79ea

Err, on second thoughts that depends on the device not having an id=. If
it does, then it's foo.0, not pci.0.

Andreas


-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] QEMU: PCI bus name on PowerPC platforms
  2014-03-05 14:33           ` Paolo Bonzini
@ 2014-03-05 14:40             ` Daniel P. Berrange
  2014-04-10  9:24             ` Daniel P. Berrange
  1 sibling, 0 replies; 20+ messages in thread
From: Daniel P. Berrange @ 2014-03-05 14:40 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Hong-Hua.Yin@freescale.com, Alexey Kardashevskiy,
	qemu-devel@nongnu.org, Li Zhang, agraf@suse.de,
	qemu-ppc@nongnu.org, david@gibson.dropbear.id.au

On Wed, Mar 05, 2014 at 03:33:39PM +0100, Paolo Bonzini wrote:
> Il 05/03/2014 15:21, Daniel P. Berrange ha scritto:
> >>alpha/typhoon.c:    b = pci_register_bus(dev, "pci",
> >>mips/gt64xxx_pci.c:     phb->bus = pci_register_bus(dev, "pci",
> >>pci-host/apb.c:    phb->bus = pci_register_bus(DEVICE(phb), "pci",
> >>pci-host/bonito.c:    phb->bus = pci_register_bus(DEVICE(dev), "pci",
> >>sh4/sh_pci.c:    phb->bus = pci_register_bus(DEVICE(dev), "pci",
> >>pci-host/versatile.c:    pci_bus_new_inplace(&s->pci_bus, sizeof(s->pci_bus), DEVICE(obj), "pci",
> >>
> >>plus pseries which has its own rules because it supports multiple PCI
> >>host bridges, but probably can also be changed from "pci" to NULL.
> >
> >I'm not sure I understand the effect of changing 'pci' to NULL in this
> >code, from libvirt's POV. Would using NULL mean we can rely on using
> >"pci.0" as the default PCI bus name or not ?
> 
> Yes.  But the next bus that the user creates (e.g. from a PCI bridge
> without an "id") would be "pci.1" instead of having a duplicate
> "pci.0").  Needs a bit more testing of course.

That sounds OK from libvirt's POV, since when we create secondary buses
we'll always set an ID value explicitly anyway.

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 :|

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] QEMU: PCI bus name on PowerPC platforms
  2014-03-05 14:38             ` Andreas Färber
@ 2014-03-05 14:44               ` Paolo Bonzini
  0 siblings, 0 replies; 20+ messages in thread
From: Paolo Bonzini @ 2014-03-05 14:44 UTC (permalink / raw)
  To: Andreas Färber, Daniel P. Berrange
  Cc: Hong-Hua.Yin@freescale.com, Alexey Kardashevskiy,
	qemu-devel@nongnu.org, Li Zhang, agraf@suse.de,
	qemu-ppc@nongnu.org, david@gibson.dropbear.id.au

Il 05/03/2014 15:38, Andreas Färber ha scritto:
>> >
>> > I believe so, yes. See
>> > https://github.com/afaerber/qemu-cpu/commit/ce1c9b4302a4458e73ae6a6a13f4e4ee121f79ea
> Err, on second thoughts that depends on the device not having an id=. If
> it does, then it's foo.0, not pci.0.

Yeah, but builtin devices created by the boards likely will not have 
ids.  This is what needs testing.

Paolo

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] QEMU: PCI bus name on PowerPC platforms
  2014-03-05 13:35   ` Paolo Bonzini
  2014-03-05 13:40     ` Daniel P. Berrange
@ 2014-03-05 15:15     ` Alexey Kardashevskiy
  2014-03-06  2:25       ` Hong-Hua.Yin
  2014-03-06  7:04       ` Hong-Hua.Yin
  1 sibling, 2 replies; 20+ messages in thread
From: Alexey Kardashevskiy @ 2014-03-05 15:15 UTC (permalink / raw)
  To: Paolo Bonzini, Hong-Hua.Yin@freescale.com,
	david@gibson.dropbear.id.au, agraf@suse.de
  Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Li Zhang

On 03/06/2014 12:35 AM, Paolo Bonzini wrote:
> Il 05/03/2014 12:43, Alexey Kardashevskiy ha scritto:
>>
>> I just tried current upstresm QEMU and it handles bus=pci fine, it prints
>> an error on bus=pci.0 so I am confused - what qemu are you trying?
> 
> See below:

I understand, just got confused that "pci" did not work.


> 1) virtex-ml507
> 2) pseries
> Warning: Disabling some instructions which are not emulated by TCG (0x0, 0x4)
>     bus: pci
> 3) prep
>     bus: pci.0
> 4) bamboo
>     bus: pci.0
> 5) ref405ep
> qemu-system-ppc64: Could not load PowerPC BIOS 'ppc405_rom.bin'
> 6) taihu
> qemu-system-ppc64: Could not load PowerPC BIOS 'ppc405_rom.bin'
> 7) mpc8544ds
>     bus: pci.0
> 8) g3beige
>     bus: pci.0
> 9) mac99
>     bus: pci.0
> 10) ppce500
>     bus: pci.0
> 
> pseries is the odd one, I think the right thing to do is for QEMU to change
> the bus name incompatibly, and libvirt to cope with it.

Originally "pci" was used to make libvirt happy so we can easily switch
pseries to pci.0 or NULL.



-- 
Alexey

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] QEMU: PCI bus name on PowerPC platforms
  2014-03-05 15:15     ` Alexey Kardashevskiy
@ 2014-03-06  2:25       ` Hong-Hua.Yin
  2014-03-06  7:04       ` Hong-Hua.Yin
  1 sibling, 0 replies; 20+ messages in thread
From: Hong-Hua.Yin @ 2014-03-06  2:25 UTC (permalink / raw)
  To: Alexey Kardashevskiy, Paolo Bonzini, david@gibson.dropbear.id.au,
	agraf@suse.de
  Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Li Zhang

Hi Alexey,

I just clone qemu from git://git.qemu.org/qemu.git.
commit f55ea6297cc0224fe4934b90ff5343b620b14669

$ ./configure --target-list=ppc64-softmmu --disable-sdl --disable-guest-agent --prefix="/usr/local"
$ make
$ ./ppc64-softmmu/qemu-system-ppc64 --version
QEMU emulator version 1.7.50, Copyright (c) 2003-2008 Fabrice Bellard


Since libvirt only recognize 'pci' on platforms exclude x86_86/i686, 
so it will work with 'pci' on pseries.

$ ./ppc64-softmmu/qemu-system-ppc64 -serial tcp::4444,server,telnet -nographic -M pseries
QEMU 1.7.50 monitor - type 'help' for more information
(qemu) QEMU waiting for connection on: telnet:0.0.0.0:4444,server
Warning: Disabling some instructions which are not emulated by TCG (0x0, 0x4)

(qemu) info qtree
bus: main-system-bus
  type System
  dev: spapr-pci-host-bridge, id ""
    index = 0 (0)
    buid = 576460752840294400 (0x800000020000000)
    liobn = 2147483648 (0x80000000)
    mem_win_addr = 1102195982336 (0x100a0000000)
    mem_win_size = 536870912 (0x20000000)
    io_win_addr = 1101659111424 (0x10080000000)
    io_win_size = 65536 (0x10000)
    irq 0
    bus: pci
...

But our problem happened on mpc8544ds/ppce500 and most of other PPC 
platforms because they use 'pci.0' as bus name and there's no 'pci'.

$ ./ppc64-softmmu/qemu-system-ppc64 -serial tcp::4444,server,telnet -nographic -M ppce500
QEMU 1.7.50 monitor - type 'help' for more information
(qemu) QEMU waiting for connection on: telnet:0.0.0.0:4444,server

(qemu) info qtree
bus: main-system-bus
  type System
  dev: e500-spin, id ""
    irq 0
    mmio 00000000ef000000/0000000000000400
  dev: e500-pcihost, id ""
    first_slot = 1 (0x1)
    irq 4
    mmio ffffffffffffffff/0000000000001000
    mmio 00000000e1000000/0000000000010000
    bus: pci.0
...

We wish create a whole solution for all PowerPC platforms in libvirt.
So the comments from different vendors will be very important.

Best Regards,
Olivia


> -----Original Message-----
> From: Alexey Kardashevskiy [mailto:aik@ozlabs.ru]
> Sent: Wednesday, March 05, 2014 11:16 PM
> To: Paolo Bonzini; Yin Olivia-R63875; david@gibson.dropbear.id.au;
> agraf@suse.de
> Cc: qemu-ppc@nongnu.org; qemu-devel@nongnu.org; Li Zhang
> Subject: Re: QEMU: PCI bus name on PowerPC platforms
> 
> On 03/06/2014 12:35 AM, Paolo Bonzini wrote:
> > Il 05/03/2014 12:43, Alexey Kardashevskiy ha scritto:
> >>
> >> I just tried current upstresm QEMU and it handles bus=pci fine, it
> >> prints an error on bus=pci.0 so I am confused - what qemu are you trying?
> >
> > See below:
> 
> I understand, just got confused that "pci" did not work.
> 
> 
> > 1) virtex-ml507
> > 2) pseries
> > Warning: Disabling some instructions which are not emulated by TCG (0x0,
> 0x4)
> >     bus: pci
> > 3) prep
> >     bus: pci.0
> > 4) bamboo
> >     bus: pci.0
> > 5) ref405ep
> > qemu-system-ppc64: Could not load PowerPC BIOS 'ppc405_rom.bin'
> > 6) taihu
> > qemu-system-ppc64: Could not load PowerPC BIOS 'ppc405_rom.bin'
> > 7) mpc8544ds
> >     bus: pci.0
> > 8) g3beige
> >     bus: pci.0
> > 9) mac99
> >     bus: pci.0
> > 10) ppce500
> >     bus: pci.0
> >
> > pseries is the odd one, I think the right thing to do is for QEMU to
> > change the bus name incompatibly, and libvirt to cope with it.
> 
> Originally "pci" was used to make libvirt happy so we can easily switch
> pseries to pci.0 or NULL.
> 
> 
> 
> --
> Alexey
> 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] QEMU: PCI bus name on PowerPC platforms
  2014-03-05 15:15     ` Alexey Kardashevskiy
  2014-03-06  2:25       ` Hong-Hua.Yin
@ 2014-03-06  7:04       ` Hong-Hua.Yin
  2014-03-06  7:07         ` Alexey Kardashevskiy
  1 sibling, 1 reply; 20+ messages in thread
From: Hong-Hua.Yin @ 2014-03-06  7:04 UTC (permalink / raw)
  To: Alexey Kardashevskiy, Paolo Bonzini, david@gibson.dropbear.id.au,
	agraf@suse.de
  Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Li Zhang

Hi Alexey,

Even though you change the default PCI bus naming, it will need detect 
the QEMU version in libvirt to keep compatibility with old QEMU version.


Best Regards,
Olivia

> -----Original Message-----
> From: Alexey Kardashevskiy [mailto:aik@ozlabs.ru]
> Sent: Wednesday, March 05, 2014 11:16 PM
> To: Paolo Bonzini; Yin Olivia-R63875; david@gibson.dropbear.id.au;
> agraf@suse.de
> Cc: qemu-ppc@nongnu.org; qemu-devel@nongnu.org; Li Zhang
> Subject: Re: QEMU: PCI bus name on PowerPC platforms
> 
> On 03/06/2014 12:35 AM, Paolo Bonzini wrote:
> > Il 05/03/2014 12:43, Alexey Kardashevskiy ha scritto:
> >>
> >> I just tried current upstresm QEMU and it handles bus=pci fine, it
> >> prints an error on bus=pci.0 so I am confused - what qemu are you trying?
> >
> > See below:
> 
> I understand, just got confused that "pci" did not work.
> 
> 
> > 1) virtex-ml507
> > 2) pseries
> > Warning: Disabling some instructions which are not emulated by TCG (0x0,
> 0x4)
> >     bus: pci
> > 3) prep
> >     bus: pci.0
> > 4) bamboo
> >     bus: pci.0
> > 5) ref405ep
> > qemu-system-ppc64: Could not load PowerPC BIOS 'ppc405_rom.bin'
> > 6) taihu
> > qemu-system-ppc64: Could not load PowerPC BIOS 'ppc405_rom.bin'
> > 7) mpc8544ds
> >     bus: pci.0
> > 8) g3beige
> >     bus: pci.0
> > 9) mac99
> >     bus: pci.0
> > 10) ppce500
> >     bus: pci.0
> >
> > pseries is the odd one, I think the right thing to do is for QEMU to
> > change the bus name incompatibly, and libvirt to cope with it.
> 
> Originally "pci" was used to make libvirt happy so we can easily switch
> pseries to pci.0 or NULL.
> 
> 
> 
> --
> Alexey
> 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] QEMU: PCI bus name on PowerPC platforms
  2014-03-06  7:04       ` Hong-Hua.Yin
@ 2014-03-06  7:07         ` Alexey Kardashevskiy
  2014-03-06  7:21           ` Hong-Hua.Yin
  0 siblings, 1 reply; 20+ messages in thread
From: Alexey Kardashevskiy @ 2014-03-06  7:07 UTC (permalink / raw)
  To: Hong-Hua.Yin@freescale.com, Paolo Bonzini,
	david@gibson.dropbear.id.au, agraf@suse.de
  Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Li Zhang

On 03/06/2014 06:04 PM, Hong-Hua.Yin@freescale.com wrote:
> Hi Alexey,
> 
> Even though you change the default PCI bus naming, it will need detect 
> the QEMU version in libvirt to keep compatibility with old QEMU version.


So?



> Best Regards,
> Olivia
> 
>> -----Original Message-----
>> From: Alexey Kardashevskiy [mailto:aik@ozlabs.ru]
>> Sent: Wednesday, March 05, 2014 11:16 PM
>> To: Paolo Bonzini; Yin Olivia-R63875; david@gibson.dropbear.id.au;
>> agraf@suse.de
>> Cc: qemu-ppc@nongnu.org; qemu-devel@nongnu.org; Li Zhang
>> Subject: Re: QEMU: PCI bus name on PowerPC platforms
>>
>> On 03/06/2014 12:35 AM, Paolo Bonzini wrote:
>>> Il 05/03/2014 12:43, Alexey Kardashevskiy ha scritto:
>>>>
>>>> I just tried current upstresm QEMU and it handles bus=pci fine, it
>>>> prints an error on bus=pci.0 so I am confused - what qemu are you trying?
>>>
>>> See below:
>>
>> I understand, just got confused that "pci" did not work.
>>
>>
>>> 1) virtex-ml507
>>> 2) pseries
>>> Warning: Disabling some instructions which are not emulated by TCG (0x0,
>> 0x4)
>>>     bus: pci
>>> 3) prep
>>>     bus: pci.0
>>> 4) bamboo
>>>     bus: pci.0
>>> 5) ref405ep
>>> qemu-system-ppc64: Could not load PowerPC BIOS 'ppc405_rom.bin'
>>> 6) taihu
>>> qemu-system-ppc64: Could not load PowerPC BIOS 'ppc405_rom.bin'
>>> 7) mpc8544ds
>>>     bus: pci.0
>>> 8) g3beige
>>>     bus: pci.0
>>> 9) mac99
>>>     bus: pci.0
>>> 10) ppce500
>>>     bus: pci.0
>>>
>>> pseries is the odd one, I think the right thing to do is for QEMU to
>>> change the bus name incompatibly, and libvirt to cope with it.
>>
>> Originally "pci" was used to make libvirt happy so we can easily switch
>> pseries to pci.0 or NULL.
>>
>>
>>
>> --
>> Alexey
>>
> 


-- 
Alexey

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] QEMU: PCI bus name on PowerPC platforms
  2014-03-06  7:07         ` Alexey Kardashevskiy
@ 2014-03-06  7:21           ` Hong-Hua.Yin
  0 siblings, 0 replies; 20+ messages in thread
From: Hong-Hua.Yin @ 2014-03-06  7:21 UTC (permalink / raw)
  To: Alexey Kardashevskiy, Paolo Bonzini, david@gibson.dropbear.id.au,
	agraf@suse.de
  Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Li Zhang

> -----Original Message-----
> From: Alexey Kardashevskiy [mailto:aik@ozlabs.ru]
> Sent: Thursday, March 06, 2014 3:08 PM
> To: Yin Olivia-R63875; Paolo Bonzini; david@gibson.dropbear.id.au;
> agraf@suse.de
> Cc: qemu-ppc@nongnu.org; qemu-devel@nongnu.org; Li Zhang
> Subject: Re: QEMU: PCI bus name on PowerPC platforms
> 
> On 03/06/2014 06:04 PM, Hong-Hua.Yin@freescale.com wrote:
> > Hi Alexey,
> >
> > Even though you change the default PCI bus naming, it will need detect
> > the QEMU version in libvirt to keep compatibility with old QEMU version.
> 
> 
> So?
> 

My comment is not related to your patch for QEMU.

I mean that we need add version detection in libvirt like below after your patch accepted:
libvirt/src/qemu/qemu_capabilities.c: virQEMUCapsComputeCmdFlags()
...
    if (version >= 9000)
        virQEMUCapsSet(qemuCaps, QEMU_CAPS_VNC_COLON);

    if (is_kvm && (version >= 10000 || kvm_version >= 74))
        virQEMUCapsSet(qemuCaps, QEMU_CAPS_VNET_HDR);
...

We need judge which version of QEMU support 'pci' for pseries and which version support 'pci.0'.
 
> > Best Regar

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] QEMU: PCI bus name on PowerPC platforms
  2014-03-05 14:33           ` Paolo Bonzini
  2014-03-05 14:40             ` Daniel P. Berrange
@ 2014-04-10  9:24             ` Daniel P. Berrange
  2014-04-11 11:40               ` Alexey Kardashevskiy
  1 sibling, 1 reply; 20+ messages in thread
From: Daniel P. Berrange @ 2014-04-10  9:24 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Hong-Hua.Yin@freescale.com, Alexey Kardashevskiy,
	qemu-devel@nongnu.org, Li Zhang, agraf@suse.de,
	qemu-ppc@nongnu.org, david@gibson.dropbear.id.au

On Wed, Mar 05, 2014 at 03:33:39PM +0100, Paolo Bonzini wrote:
> Il 05/03/2014 15:21, Daniel P. Berrange ha scritto:
> >>alpha/typhoon.c:    b = pci_register_bus(dev, "pci",
> >>mips/gt64xxx_pci.c:     phb->bus = pci_register_bus(dev, "pci",
> >>pci-host/apb.c:    phb->bus = pci_register_bus(DEVICE(phb), "pci",
> >>pci-host/bonito.c:    phb->bus = pci_register_bus(DEVICE(dev), "pci",
> >>sh4/sh_pci.c:    phb->bus = pci_register_bus(DEVICE(dev), "pci",
> >>pci-host/versatile.c:    pci_bus_new_inplace(&s->pci_bus, sizeof(s->pci_bus), DEVICE(obj), "pci",
> >>
> >>plus pseries which has its own rules because it supports multiple PCI
> >>host bridges, but probably can also be changed from "pci" to NULL.
> >
> >I'm not sure I understand the effect of changing 'pci' to NULL in this
> >code, from libvirt's POV. Would using NULL mean we can rely on using
> >"pci.0" as the default PCI bus name or not ?
> 
> Yes.  But the next bus that the user creates (e.g. from a PCI bridge
> without an "id") would be "pci.1" instead of having a duplicate
> "pci.0").  Needs a bit more testing of course.

What's the status of this ?  I see the patch merged which only changes
the bus name for ppc64  spapr-pci board

commit 1b8601b0ea0b91467561e0bbddd52a833e4b2b1a
Author: Alexey Kardashevskiy <aik@ozlabs.ru>
Date:   Thu Mar 6 14:11:00 2014 +1100

    spapr-pci: Change the default PCI bus naming

but AFAICT nothing got merged to change this for all the other boards as
discussed here :-(  This is painful for libvirt since we have todo even
more hacks triggered off machine names now, instead of being able to
rely on pci.0 naming as we hoped.


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 :|

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] QEMU: PCI bus name on PowerPC platforms
  2014-04-10  9:24             ` Daniel P. Berrange
@ 2014-04-11 11:40               ` Alexey Kardashevskiy
  2014-04-11 12:27                 ` Eric Blake
  0 siblings, 1 reply; 20+ messages in thread
From: Alexey Kardashevskiy @ 2014-04-11 11:40 UTC (permalink / raw)
  To: Daniel P. Berrange, Paolo Bonzini
  Cc: Hong-Hua.Yin@freescale.com, qemu-devel@nongnu.org, Li Zhang,
	agraf@suse.de, qemu-ppc@nongnu.org, david@gibson.dropbear.id.au

On 04/10/2014 07:24 PM, Daniel P. Berrange wrote:
> On Wed, Mar 05, 2014 at 03:33:39PM +0100, Paolo Bonzini wrote:
>> Il 05/03/2014 15:21, Daniel P. Berrange ha scritto:
>>>> alpha/typhoon.c:    b = pci_register_bus(dev, "pci",
>>>> mips/gt64xxx_pci.c:     phb->bus = pci_register_bus(dev, "pci",
>>>> pci-host/apb.c:    phb->bus = pci_register_bus(DEVICE(phb), "pci",
>>>> pci-host/bonito.c:    phb->bus = pci_register_bus(DEVICE(dev), "pci",
>>>> sh4/sh_pci.c:    phb->bus = pci_register_bus(DEVICE(dev), "pci",
>>>> pci-host/versatile.c:    pci_bus_new_inplace(&s->pci_bus, sizeof(s->pci_bus), DEVICE(obj), "pci",
>>>>
>>>> plus pseries which has its own rules because it supports multiple PCI
>>>> host bridges, but probably can also be changed from "pci" to NULL.
>>>
>>> I'm not sure I understand the effect of changing 'pci' to NULL in this
>>> code, from libvirt's POV. Would using NULL mean we can rely on using
>>> "pci.0" as the default PCI bus name or not ?
>>
>> Yes.  But the next bus that the user creates (e.g. from a PCI bridge
>> without an "id") would be "pci.1" instead of having a duplicate
>> "pci.0").  Needs a bit more testing of course.
> 
> What's the status of this ?  I see the patch merged which only changes
> the bus name for ppc64  spapr-pci board
> 
> commit 1b8601b0ea0b91467561e0bbddd52a833e4b2b1a
> Author: Alexey Kardashevskiy <aik@ozlabs.ru>
> Date:   Thu Mar 6 14:11:00 2014 +1100
> 
>     spapr-pci: Change the default PCI bus naming
> 
> but AFAICT nothing got merged to change this for all the other boards as
> discussed here :-(  This is painful for libvirt since we have todo even
> more hacks triggered off machine names now, instead of being able to
> rely on pci.0 naming as we hoped.

Sorry, I am missing the point.
How could making a platform similar to many others force you to do more
hacks, not less?



-- 
Alexey

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] QEMU: PCI bus name on PowerPC platforms
  2014-04-11 11:40               ` Alexey Kardashevskiy
@ 2014-04-11 12:27                 ` Eric Blake
  2014-04-11 12:29                   ` Alexander Graf
  0 siblings, 1 reply; 20+ messages in thread
From: Eric Blake @ 2014-04-11 12:27 UTC (permalink / raw)
  To: Alexey Kardashevskiy, Daniel P. Berrange, Paolo Bonzini
  Cc: Hong-Hua.Yin@freescale.com, qemu-devel@nongnu.org, Li Zhang,
	agraf@suse.de, qemu-ppc@nongnu.org, david@gibson.dropbear.id.au

[-- Attachment #1: Type: text/plain, Size: 1537 bytes --]

On 04/11/2014 05:40 AM, Alexey Kardashevskiy wrote:

>> but AFAICT nothing got merged to change this for all the other boards as
>> discussed here :-(  This is painful for libvirt since we have todo even
>> more hacks triggered off machine names now, instead of being able to
>> rely on pci.0 naming as we hoped.
> 
> Sorry, I am missing the point.
> How could making a platform similar to many others force you to do more
> hacks, not less?

As mentioned in the thread here:
https://lists.gnu.org/archive/html/qemu-devel/2014-04/threads.html#01565

If there is a way to query via QMP to see which naming scheme is in
effect, there are no hacks involved - we just ask and get it right.

If ALL platforms behave identically as of a certain release, we have a
minimal hack - catering to releases older than that, where a downstream
backport may have to tweak how we detect older releases, but it is only
a single place to be hacked.

But with just this patch, you have caused the situation where it is
neither introspectible, nor consistent across qemu versions.  The only
way to code that up in libvirt is to do MULTIPLE version checks and
correlate it with architecture checks - and that's the hack we don't
want to have to support.  Every single version check done in lieu of
proper feature introspection is yet one more pain point when features
get backported across version numbers downstream.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [Qemu-devel] QEMU: PCI bus name on PowerPC platforms
  2014-04-11 12:27                 ` Eric Blake
@ 2014-04-11 12:29                   ` Alexander Graf
  0 siblings, 0 replies; 20+ messages in thread
From: Alexander Graf @ 2014-04-11 12:29 UTC (permalink / raw)
  To: Eric Blake, Alexey Kardashevskiy, Daniel P. Berrange,
	Paolo Bonzini
  Cc: Li Zhang, qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	Hong-Hua.Yin@freescale.com, david@gibson.dropbear.id.au


On 11.04.14 14:27, Eric Blake wrote:
> On 04/11/2014 05:40 AM, Alexey Kardashevskiy wrote:
>
>>> but AFAICT nothing got merged to change this for all the other boards as
>>> discussed here :-(  This is painful for libvirt since we have todo even
>>> more hacks triggered off machine names now, instead of being able to
>>> rely on pci.0 naming as we hoped.
>> Sorry, I am missing the point.
>> How could making a platform similar to many others force you to do more
>> hacks, not less?
> As mentioned in the thread here:
> https://lists.gnu.org/archive/html/qemu-devel/2014-04/threads.html#01565
>
> If there is a way to query via QMP to see which naming scheme is in
> effect, there are no hacks involved - we just ask and get it right.
>
> If ALL platforms behave identically as of a certain release, we have a
> minimal hack - catering to releases older than that, where a downstream
> backport may have to tweak how we detect older releases, but it is only
> a single place to be hacked.
>
> But with just this patch, you have caused the situation where it is
> neither introspectible, nor consistent across qemu versions.  The only
> way to code that up in libvirt is to do MULTIPLE version checks and
> correlate it with architecture checks - and that's the hack we don't
> want to have to support.  Every single version check done in lieu of
> proper feature introspection is yet one more pain point when features
> get backported across version numbers downstream.

So how do you support -M ppce500 which also uses pci.0 and runs on 
(booke) ppc64?


Alex

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2014-04-11 12:29 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-05 10:42 [Qemu-devel] QEMU: PCI bus name on PowerPC platforms Hong-Hua.Yin
2014-03-05 11:43 ` Alexey Kardashevskiy
2014-03-05 13:35   ` Paolo Bonzini
2014-03-05 13:40     ` Daniel P. Berrange
2014-03-05 14:12       ` Paolo Bonzini
2014-03-05 14:21         ` Daniel P. Berrange
2014-03-05 14:33           ` Paolo Bonzini
2014-03-05 14:40             ` Daniel P. Berrange
2014-04-10  9:24             ` Daniel P. Berrange
2014-04-11 11:40               ` Alexey Kardashevskiy
2014-04-11 12:27                 ` Eric Blake
2014-04-11 12:29                   ` Alexander Graf
2014-03-05 14:35           ` Andreas Färber
2014-03-05 14:38             ` Andreas Färber
2014-03-05 14:44               ` Paolo Bonzini
2014-03-05 15:15     ` Alexey Kardashevskiy
2014-03-06  2:25       ` Hong-Hua.Yin
2014-03-06  7:04       ` Hong-Hua.Yin
2014-03-06  7:07         ` Alexey Kardashevskiy
2014-03-06  7:21           ` Hong-Hua.Yin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).