qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH RFC 0/3] qom: Generalize qdev init to "realize"


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH RFC 0/3] qom: Generalize qdev init to "realize"
Date: Tue, 27 Mar 2012 11:28:43 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120310 Thunderbird/11.0

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]