All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Wanpeng Li" <liwp@linux.vnet.ibm.com>,
	"Andreas Färber" <afaerber@suse.de>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH RFC 0/3] qom: Generalize qdev init to "realize"
Date: Tue, 27 Mar 2012 11:28:43 -0500	[thread overview]
Message-ID: <4F71EABB.1030004@codemonkey.ws> (raw)
In-Reply-To: <4F71E8AE.9030504@redhat.com>

On 03/27/2012 11:19 AM, Paolo Bonzini wrote:
> Il 26/03/2012 15:46, Andreas Färber ha scritto:
>> Hello Anthony,
>>
>> Here's a mini series introducing ObjectClass::realize(Object *) and
>> forwarding it to existing DeviceClass::init(DeviceState *).
>
> I think a major difference between realize and init should be that the
> realize property also propagates down the whole composition tree (in
> pre-order for setting to true, and post-order for setting to false).

Yes, I haven't reviewed this series yet, but my expectation would be that 
realize propagates and that the default implementation of DeviceClass::realize() 
would explicitly *not* propagate and instead just call ::init.

Likewise, unrealize() should do the same with reset().

Regards,

Anthony Liguori

>
> An important, related point is whether the composition tree should be
> created before or after realize/init.  Right now the few examples in the
> tree do it after, but this sounds wrong to me and would block the above
> auto-propagation.
>
> Paolo

  reply	other threads:[~2012-03-27 16:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-26 13:46 [Qemu-devel] [PATCH RFC 0/3] qom: Generalize qdev init to "realize" Andreas Färber
2012-03-26 13:46 ` [Qemu-devel] [PATCH RFC 1/3] qom: Add "realized" property to Object Andreas Färber
2012-03-26 15:07   ` Andreas Färber
2012-03-27  9:25   ` Stefan Hajnoczi
2012-03-26 13:46 ` [Qemu-devel] [PATCH RFC 2/3] qom: Introduce object_realize() Andreas Färber
2012-03-26 13:46 ` [Qemu-devel] [PATCH RFC 3/3] qdev: Hook up DeviceClass::init to ObjectClass::realize Andreas Färber
2012-03-26 13:54   ` Andreas Färber
2012-03-27 16:19 ` [Qemu-devel] [PATCH RFC 0/3] qom: Generalize qdev init to "realize" Paolo Bonzini
2012-03-27 16:28   ` Anthony Liguori [this message]
2012-03-27 16:33     ` Peter Maydell
2012-03-27 16:46       ` Paolo Bonzini
2012-03-27 18:56         ` Anthony Liguori
2012-03-27 16:41     ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F71EABB.1030004@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=afaerber@suse.de \
    --cc=liwp@linux.vnet.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.