From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uyj1J-0003n1-27 for qemu-devel@nongnu.org; Mon, 15 Jul 2013 09:40:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uyj1G-0006ie-Dt for qemu-devel@nongnu.org; Mon, 15 Jul 2013 09:40:52 -0400 Received: from cantor2.suse.de ([195.135.220.15]:42090 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uyj1F-0006iN-RO for qemu-devel@nongnu.org; Mon, 15 Jul 2013 09:40:50 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Mon, 15 Jul 2013 15:40:36 +0200 Message-Id: <1373895639-21476-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH RFC 0/3] Recursive QOM realize List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: "Peter C. Crosthwaite" , Hu Tao , Blue Swirl , Anthony Liguori , Paolo Bonzini , =?UTF-8?q?Andreas=20F=C3=A4rber?= 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 =3D 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 ra= ther than child<> properties. On machine creation done, a depth-first search i= s done for devices from /machine, which are then expected to further propagate t= he 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 solu= tion. Improvements that I would like to do as follow-ups is implementing realiz= ed property for busses so that we can set realized =3D true on the bus and h= ave it propagate from there rather than enumerating the bus from the parent devi= ce. 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 chil= dren. Cc: Anthony Liguori Cc: Blue Swirl Cc: Paolo Bonzini Cc: Hu Tao Cc: Peter C. Crosthwaite Andreas F=C3=A4rber (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(-) --=20 1.8.1.4