Re: [Qemu-devel] [RFCv2 1/2] spapr: Remove unnecessary owner field from sPAPRDRConnector

2015-09-17 Thread Michael Roth
Quoting Paolo Bonzini (2015-09-14 09:24:23) > > > On 14/09/2015 16:06, Alexey Kardashevskiy wrote: > > > > === * There is no way for a child to determine what its parent > > is. It is not * a bidirectional relationship. This is by > > design. === > > > > This part

Re: [Qemu-devel] [RFCv2 1/2] spapr: Remove unnecessary owner field from sPAPRDRConnector

2015-09-17 Thread Michael Roth
Quoting David Gibson (2015-09-15 22:16:35) > On Mon, Sep 14, 2015 at 04:24:23PM +0200, Paolo Bonzini wrote: > > > > > > On 14/09/2015 16:06, Alexey Kardashevskiy wrote: > > > > > > === * There is no way for a child to determine what its parent > > > is. It is not * a bidirectional

Re: [Qemu-devel] [RFCv2 1/2] spapr: Remove unnecessary owner field from sPAPRDRConnector

2015-09-17 Thread Paolo Bonzini
On 17/09/2015 17:50, Michael Roth wrote: > We still need globals for RTAS lookups. I think QOM is our most > mature/well-tested interface for managing inter-device > relationships/lookups, but I can understand if using > root_container/link seems off. To me it seem like a nice > "freebie" we get

Re: [Qemu-devel] [RFCv2 1/2] spapr: Remove unnecessary owner field from sPAPRDRConnector

2015-09-17 Thread Michael Roth
Quoting Paolo Bonzini (2015-09-17 10:53:40) > > > On 17/09/2015 17:50, Michael Roth wrote: > > We still need globals for RTAS lookups. I think QOM is our most > > mature/well-tested interface for managing inter-device > > relationships/lookups, but I can understand if using > >

Re: [Qemu-devel] [RFCv2 1/2] spapr: Remove unnecessary owner field from sPAPRDRConnector

2015-09-15 Thread David Gibson
On Mon, Sep 14, 2015 at 04:24:23PM +0200, Paolo Bonzini wrote: > > > On 14/09/2015 16:06, Alexey Kardashevskiy wrote: > > > > === * There is no way for a child to determine what its parent > > is. It is not * a bidirectional relationship. This is by > > design. === > > >

Re: [Qemu-devel] [RFCv2 1/2] spapr: Remove unnecessary owner field from sPAPRDRConnector

2015-09-15 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 15/09/2015 02:30, David Gibson wrote: >>> I think the comment is wrong or at least inaccurate; it only >>> applies to the external QOM interface. The patch is a good >>> idea, even though OBJECT(x)->y traditionally is not used >>> (instead you

Re: [Qemu-devel] [RFCv2 1/2] spapr: Remove unnecessary owner field from sPAPRDRConnector

2015-09-14 Thread David Gibson
On Mon, Sep 14, 2015 at 06:22:35PM +1000, Alexey Kardashevskiy wrote: > On 09/14/2015 11:41 AM, David Gibson wrote: > >The sPAPRDRConnector pseudo-device contains an owner field which is > >set in spapr_dr_connector_new(). However, that function also calls > >object_property_add_child() to set

Re: [Qemu-devel] [RFCv2 1/2] spapr: Remove unnecessary owner field from sPAPRDRConnector

2015-09-14 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 14/09/2015 13:45, David Gibson wrote: >>> >>> === * There is no way for a child to determine what its parent >>> is. It is not * a bidirectional relationship. This is by >>> design. === >>> >>> This part always confused me as there is

Re: [Qemu-devel] [RFCv2 1/2] spapr: Remove unnecessary owner field from sPAPRDRConnector

2015-09-14 Thread Alexey Kardashevskiy
On 09/14/2015 10:11 PM, Paolo Bonzini wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 14/09/2015 13:45, David Gibson wrote: === * There is no way for a child to determine what its parent is. It is not * a bidirectional relationship. This is by design. === This part always

Re: [Qemu-devel] [RFCv2 1/2] spapr: Remove unnecessary owner field from sPAPRDRConnector

2015-09-14 Thread Paolo Bonzini
On 14/09/2015 16:06, Alexey Kardashevskiy wrote: > > === * There is no way for a child to determine what its parent > is. It is not * a bidirectional relationship. This is by > design. === > > This part always confused me as there is "Object *parent" in > the

Re: [Qemu-devel] [RFCv2 1/2] spapr: Remove unnecessary owner field from sPAPRDRConnector

2015-09-14 Thread David Gibson
On Mon, Sep 14, 2015 at 02:11:53PM +0200, Paolo Bonzini wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > > > On 14/09/2015 13:45, David Gibson wrote: > >>> > >>> === * There is no way for a child to determine what its parent > >>> is. It is not * a bidirectional relationship.

Re: [Qemu-devel] [RFCv2 1/2] spapr: Remove unnecessary owner field from sPAPRDRConnector

2015-09-14 Thread David Gibson
On Tue, Sep 15, 2015 at 12:06:49AM +1000, Alexey Kardashevskiy wrote: > On 09/14/2015 10:11 PM, Paolo Bonzini wrote: > >-BEGIN PGP SIGNED MESSAGE- > >Hash: SHA256 > > > > > > > >On 14/09/2015 13:45, David Gibson wrote: > > === * There is no way for a child to determine what its

Re: [Qemu-devel] [RFCv2 1/2] spapr: Remove unnecessary owner field from sPAPRDRConnector

2015-09-14 Thread Bharata B Rao
On Mon, Sep 14, 2015 at 11:41:52AM +1000, David Gibson wrote: > The sPAPRDRConnector pseudo-device contains an owner field which is > set in spapr_dr_connector_new(). However, that function also calls > object_property_add_child() to set the DRConnector as the QOM child of > the owner object.

Re: [Qemu-devel] [RFCv2 1/2] spapr: Remove unnecessary owner field from sPAPRDRConnector

2015-09-14 Thread Alexey Kardashevskiy
On 09/14/2015 11:41 AM, David Gibson wrote: The sPAPRDRConnector pseudo-device contains an owner field which is set in spapr_dr_connector_new(). However, that function also calls object_property_add_child() to set the DRConnector as the QOM child of the owner object. That means that owner is

[Qemu-devel] [RFCv2 1/2] spapr: Remove unnecessary owner field from sPAPRDRConnector

2015-09-13 Thread David Gibson
The sPAPRDRConnector pseudo-device contains an owner field which is set in spapr_dr_connector_new(). However, that function also calls object_property_add_child() to set the DRConnector as the QOM child of the owner object. That means that owner is always the same as the QOM parent, and so