From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43923) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCZGS-0004N6-7v for qemu-devel@nongnu.org; Tue, 27 Mar 2012 12:29:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCZGK-0008FD-JI for qemu-devel@nongnu.org; Tue, 27 Mar 2012 12:28:55 -0400 Received: from mail-gx0-f173.google.com ([209.85.161.173]:36715) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCZGK-0008F5-EJ for qemu-devel@nongnu.org; Tue, 27 Mar 2012 12:28:48 -0400 Received: by ggnp2 with SMTP id p2so109719ggn.4 for ; Tue, 27 Mar 2012 09:28:47 -0700 (PDT) Message-ID: <4F71EABB.1030004@codemonkey.ws> Date: Tue, 27 Mar 2012 11:28:43 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1332769612-4247-1-git-send-email-afaerber@suse.de> <4F71E8AE.9030504@redhat.com> In-Reply-To: <4F71E8AE.9030504@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH RFC 0/3] qom: Generalize qdev init to "realize" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Wanpeng Li , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= , qemu-devel@nongnu.org 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