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 <[email protected]>
Cc: Blue Swirl <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: Hu Tao <[email protected]>
Cc: Peter C. Crosthwaite <[email protected]>
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