qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH RFC 0/3] Recursive QOM realize
@ 2013-07-15 13:40 Andreas Färber
  2013-07-15 13:40 ` [Qemu-devel] [PATCH RFC 1/3] qdev: Add support for recursive realization Andreas Färber
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Andreas Färber @ 2013-07-15 13:40 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter C. Crosthwaite, Hu Tao, Blue Swirl, Anthony Liguori,
	Paolo Bonzini, Andreas Färber

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

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

end of thread, other threads:[~2013-07-16 12:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-15 13:40 [Qemu-devel] [PATCH RFC 0/3] Recursive QOM realize Andreas Färber
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

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).