qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: qemu-devel@nongnu.org
Cc: "Peter C. Crosthwaite" <peter.crosthwaite@xilinx.com>,
	"Hu Tao" <hutao@cn.fujitsu.com>,
	"Blue Swirl" <blauwirbel@gmail.com>,
	"Anthony Liguori" <anthony@codemonkey.ws>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Andreas Färber" <afaerber@suse.de>
Subject: [Qemu-devel] [PATCH RFC 0/3] Recursive QOM realize
Date: Mon, 15 Jul 2013 15:40:36 +0200	[thread overview]
Message-ID: <1373895639-21476-1-git-send-email-afaerber@suse.de> (raw)

Hello,

To honor the Soft Freeze, here is an early throw at recursive realization
based on earlier patches from Paolo.

Originally Paolo and me had implemented QOM realize at Object level.
Paolo's goal was to set realized = true on /machine and it propagating from
there on. This series now implements {realize,unrealize}_children at
DeviceState level instead and propagates realized changes along busses rather
than child<> properties. On machine creation done, a depth-first search is done
for devices from /machine, which are then expected to further propagate the
property change.

The idea is to get this framework in place so that we can slowly drop
qdev_init[_nofail]() / object_property_set_bool() calls in realizefns and
machine inits and avoid coding manual realize propagation as interim solution.

Improvements that I would like to do as follow-ups is implementing realized
property for busses so that we can set realized = true on the bus and have it
propagate from there rather than enumerating the bus from the parent device.

Regards,
Andreas

>From Paolo's qom-next patches:
* Implemented in DeviceClass rather than ObjectClass
* Implemented [un]realize_children by depth-first search for devices and
  propagating along busses rather than child<> properties.
* Implemented central realization in qdev_machine_creation_done().
* Added patch asserting that late-realizing devices no longer create children.

Cc: Anthony Liguori <anthony@codemonkey.ws>
Cc: Blue Swirl <blauwirbel@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Hu Tao <hutao@cn.fujitsu.com>
Cc: Peter C. Crosthwaite <peter.crosthwaite@xilinx.com>

Andreas Färber (3):
  qdev: Add support for recursive realization
  qdev: Realize on machine creation done
  qdev: Assert no new devices get created during realization

 hw/core/qdev.c         | 92 +++++++++++++++++++++++++++++++++++++++++++++++---
 include/hw/qdev-core.h |  4 +++
 2 files changed, 92 insertions(+), 4 deletions(-)

-- 
1.8.1.4

             reply	other threads:[~2013-07-15 13:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-15 13:40 Andreas Färber [this message]
2013-07-15 13:40 ` [Qemu-devel] [PATCH RFC 1/3] qdev: Add support for recursive realization Andreas Färber
2013-07-15 13:40 ` [Qemu-devel] [PATCH RFC 2/3] qdev: Realize on machine creation done Andreas Färber
2013-07-15 13:40 ` [Qemu-devel] [PATCH RFC 3/3] qdev: Assert no new devices get created during realization Andreas Färber
2013-07-15 14:43 ` [Qemu-devel] [PATCH RFC 0/3] Recursive QOM realize Paolo Bonzini
2013-07-15 15:06   ` Andreas Färber
2013-07-15 15:37     ` Paolo Bonzini
2013-07-16 12:19       ` Andreas Färber

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=1373895639-21476-1-git-send-email-afaerber@suse.de \
    --to=afaerber@suse.de \
    --cc=anthony@codemonkey.ws \
    --cc=blauwirbel@gmail.com \
    --cc=hutao@cn.fujitsu.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.crosthwaite@xilinx.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 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).