All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] Why is "spapr-pci-host-bridge" no-user?
@ 2016-06-03  6:40 Markus Armbruster
  2016-06-03  8:40 ` Alexey Kardashevskiy
  0 siblings, 1 reply; 4+ messages in thread
From: Markus Armbruster @ 2016-06-03  6:40 UTC (permalink / raw)
  To: Alexey Kardashevskiy; +Cc: qemu-devel, qemu-ppc, Alexander Graf

Commit 09aa9a5 "spapr-pci: enable adding PHB via -device" set
cannot_instantiate_with_device_add_yet without also adding a comment
explaining why.  It is currently the only one lacking such a comment.
Let's fix that.

Unfortunately, the commit message doesn't tell me (or I'm too dense to
understand it):

    spapr-pci: enable adding PHB via -device
    
    Recent changes introduced cannot_instantiate_with_device_add_yet
    and removed capability of adding yet another PCI host bridge via
    command line for SPAPR platform (POWERPC64 server).
    
    This brings the capability back and puts SPAPR PHB into "bridge"
    category.
    
    This is not much use for emulated PHB but it is absolutely required
    for VFIO as we put an IOMMU group onto a separate PHB on SPAPR.
    
    Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
    Signed-off-by: Alexander Graf <agraf@suse.de>

Alexey, can you explain why the device cannot be used with -device /
device_add?

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

* Re: [Qemu-devel] Why is "spapr-pci-host-bridge" no-user?
  2016-06-03  6:40 [Qemu-devel] Why is "spapr-pci-host-bridge" no-user? Markus Armbruster
@ 2016-06-03  8:40 ` Alexey Kardashevskiy
  2016-06-03 11:36   ` Markus Armbruster
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Kardashevskiy @ 2016-06-03  8:40 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: qemu-devel, qemu-ppc, Alexander Graf, Michael Roth

On 03/06/16 16:40, Markus Armbruster wrote:
> Commit 09aa9a5 "spapr-pci: enable adding PHB via -device" set
> cannot_instantiate_with_device_add_yet without also adding a comment
> explaining why.  It is currently the only one lacking such a comment.
> Let's fix that.
> 
> Unfortunately, the commit message doesn't tell me (or I'm too dense to
> understand it):
> 
>     spapr-pci: enable adding PHB via -device
>     
>     Recent changes introduced cannot_instantiate_with_device_add_yet
>     and removed capability of adding yet another PCI host bridge via
>     command line for SPAPR platform (POWERPC64 server).
>     
>     This brings the capability back and puts SPAPR PHB into "bridge"
>     category.
>     
>     This is not much use for emulated PHB but it is absolutely required
>     for VFIO as we put an IOMMU group onto a separate PHB on SPAPR.
>     
>     Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>     Signed-off-by: Alexander Graf <agraf@suse.de>
> 
> Alexey, can you explain why the device cannot be used with -device /
> device_add?

It can be used with "-device" with as it is today, i.e. with
"cannot_instantiate_with_device_add_yet=false".

With "cannot_instantiate_with_device_add_yet=true", I get this:

qemu-system-ppc64: -device spapr-pci-host-bridge,id=phb10,index=10:
Parameter 'driver' expects pluggable device type


At that moment (sha1 09aa9a526a86fd2e380e86^) it failed because of
inherited "cannot_instantiate_with_device_add_yet=true" from
sysbus_device_class_init() (which is gone now):

qemu-system-ppc64: -device spapr-pci-host-bridge,id=phb10,index=10:
Parameter 'driver' expects pluggable device type

So there was my patch.


"device_add" is different, it does not work because:
(qemu) device_add spapr-pci-host-bridge
Bus 'main-system-bus' does not support hotplugging

Which I am not sure if it is true for all platforms or just spapr/ppc64 but
I do not care much now as there is some work to do anyway to support PHB
hotplug as per LoPAPR specification anyway.

Does this help? :)


-- 
Alexey

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

* Re: [Qemu-devel] Why is "spapr-pci-host-bridge" no-user?
  2016-06-03  8:40 ` Alexey Kardashevskiy
@ 2016-06-03 11:36   ` Markus Armbruster
  2016-06-03 11:52     ` Alexey Kardashevskiy
  0 siblings, 1 reply; 4+ messages in thread
From: Markus Armbruster @ 2016-06-03 11:36 UTC (permalink / raw)
  To: Alexey Kardashevskiy; +Cc: Michael Roth, qemu-ppc, qemu-devel, Alexander Graf

Alexey Kardashevskiy <aik@ozlabs.ru> writes:

> On 03/06/16 16:40, Markus Armbruster wrote:
>> Commit 09aa9a5 "spapr-pci: enable adding PHB via -device" set
>> cannot_instantiate_with_device_add_yet without also adding a comment
>> explaining why.  It is currently the only one lacking such a comment.
>> Let's fix that.
>> 
>> Unfortunately, the commit message doesn't tell me (or I'm too dense to
>> understand it):
>> 
>>     spapr-pci: enable adding PHB via -device
>>     
>>     Recent changes introduced cannot_instantiate_with_device_add_yet
>>     and removed capability of adding yet another PCI host bridge via
>>     command line for SPAPR platform (POWERPC64 server).
>>     
>>     This brings the capability back and puts SPAPR PHB into "bridge"
>>     category.
>>     
>>     This is not much use for emulated PHB but it is absolutely required
>>     for VFIO as we put an IOMMU group onto a separate PHB on SPAPR.
>>     
>>     Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>>     Signed-off-by: Alexander Graf <agraf@suse.de>
>> 
>> Alexey, can you explain why the device cannot be used with -device /
>> device_add?
>
> It can be used with "-device" with as it is today, i.e. with
> "cannot_instantiate_with_device_add_yet=false".

I misread the code.  But the assignment needs an explanation anyway :)

> With "cannot_instantiate_with_device_add_yet=true", I get this:
>
> qemu-system-ppc64: -device spapr-pci-host-bridge,id=phb10,index=10:
> Parameter 'driver' expects pluggable device type
>
>
> At that moment (sha1 09aa9a526a86fd2e380e86^) it failed because of
> inherited "cannot_instantiate_with_device_add_yet=true" from
> sysbus_device_class_init() (which is gone now):
>
> qemu-system-ppc64: -device spapr-pci-host-bridge,id=phb10,index=10:
> Parameter 'driver' expects pluggable device type
>
> So there was my patch.
>
>
> "device_add" is different, it does not work because:
> (qemu) device_add spapr-pci-host-bridge
> Bus 'main-system-bus' does not support hotplugging
>
> Which I am not sure if it is true for all platforms or just spapr/ppc64 but
> I do not care much now as there is some work to do anyway to support PHB
> hotplug as per LoPAPR specification anyway.
>
> Does this help? :)

Now you made me read the code more carefully, I have different
questions.

Can we delete the assignment?  -device
spapr-pci-host-bridge,id=phb10,index=10 still works for me then.

If not, why?

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

* Re: [Qemu-devel] Why is "spapr-pci-host-bridge" no-user?
  2016-06-03 11:36   ` Markus Armbruster
@ 2016-06-03 11:52     ` Alexey Kardashevskiy
  0 siblings, 0 replies; 4+ messages in thread
From: Alexey Kardashevskiy @ 2016-06-03 11:52 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: Michael Roth, qemu-ppc, qemu-devel, Alexander Graf

On 03/06/16 21:36, Markus Armbruster wrote:
> Alexey Kardashevskiy <aik@ozlabs.ru> writes:
> 
>> On 03/06/16 16:40, Markus Armbruster wrote:
>>> Commit 09aa9a5 "spapr-pci: enable adding PHB via -device" set
>>> cannot_instantiate_with_device_add_yet without also adding a comment
>>> explaining why.  It is currently the only one lacking such a comment.
>>> Let's fix that.
>>>
>>> Unfortunately, the commit message doesn't tell me (or I'm too dense to
>>> understand it):
>>>
>>>     spapr-pci: enable adding PHB via -device
>>>     
>>>     Recent changes introduced cannot_instantiate_with_device_add_yet
>>>     and removed capability of adding yet another PCI host bridge via
>>>     command line for SPAPR platform (POWERPC64 server).
>>>     
>>>     This brings the capability back and puts SPAPR PHB into "bridge"
>>>     category.
>>>     
>>>     This is not much use for emulated PHB but it is absolutely required
>>>     for VFIO as we put an IOMMU group onto a separate PHB on SPAPR.
>>>     
>>>     Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>>>     Signed-off-by: Alexander Graf <agraf@suse.de>
>>>
>>> Alexey, can you explain why the device cannot be used with -device /
>>> device_add?
>>
>> It can be used with "-device" with as it is today, i.e. with
>> "cannot_instantiate_with_device_add_yet=false".
> 
> I misread the code.  But the assignment needs an explanation anyway :)

imho at that moment it was pretty valid :) Now we do not even have to have
multiple PHBs on spapr, although we still support this ;)

> 
>> With "cannot_instantiate_with_device_add_yet=true", I get this:
>>
>> qemu-system-ppc64: -device spapr-pci-host-bridge,id=phb10,index=10:
>> Parameter 'driver' expects pluggable device type
>>
>>
>> At that moment (sha1 09aa9a526a86fd2e380e86^) it failed because of
>> inherited "cannot_instantiate_with_device_add_yet=true" from
>> sysbus_device_class_init() (which is gone now):
>>
>> qemu-system-ppc64: -device spapr-pci-host-bridge,id=phb10,index=10:
>> Parameter 'driver' expects pluggable device type
>>
>> So there was my patch.
>>
>>
>> "device_add" is different, it does not work because:
>> (qemu) device_add spapr-pci-host-bridge
>> Bus 'main-system-bus' does not support hotplugging
>>
>> Which I am not sure if it is true for all platforms or just spapr/ppc64 but
>> I do not care much now as there is some work to do anyway to support PHB
>> hotplug as per LoPAPR specification anyway.
>>
>> Does this help? :)
> 
> Now you made me read the code more carefully, I have different
> questions.
> 
> Can we delete the assignment?  -device
> spapr-pci-host-bridge,id=phb10,index=10 still works for me then.


_Now_ we can indeed as the default has changed, this works for me too, I
just forgot to mention this, sorry.


> 
> If not, why?
> 


-- 
Alexey

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

end of thread, other threads:[~2016-06-03 11:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-03  6:40 [Qemu-devel] Why is "spapr-pci-host-bridge" no-user? Markus Armbruster
2016-06-03  8:40 ` Alexey Kardashevskiy
2016-06-03 11:36   ` Markus Armbruster
2016-06-03 11:52     ` Alexey Kardashevskiy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.