[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 23/25] qom: add realized property
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH 23/25] qom: add realized property |
Date: |
Tue, 03 Apr 2012 14:11:33 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120312 Thunderbird/11.0 |
Paolo,
Am 03.04.2012 13:15, schrieb Paolo Bonzini:
> Since we had to move the state field from DeviceState to Object, we cannot
> delay the implementation of the "realized" property. The property is
> a trigger for two actions that propagate through the composition tree.
> "Realize" is called when the property becomes true, and propagates in
> pre-order; realize can fail if the values of the properties are not valid.
> "Unrealize" is called when the property becomes false, and propagates in
> post-order; unrealize cannot fail.
>
> Unrealize is also called by object_deinit, as a separate step before
> finalization.
>
> Realize/unrealize is separate from reset. Reset propagation is a thorny
> issue of its own. We expect classes that care to implement a reset method
> and call it from realize or realize_children, depending on whether
> pre-order or post-order is more appropriate.
>
> This patch adds four methods (realize, realize_children, unrealize,
> unrealize_children) to ObjectClass, together with a default implementation
> of realize_children and unrealize_children.
>
> Signed-off-by: Paolo Bonzini <address@hidden>
Since this patch is clearly an extended version of my realize patch
http://patchwork.ozlabs.org/patch/148752/, it should carry my SoB, as
reminded last night. If you don't want my SoB on the parts I didn't do -
namely unrealize and *_childen - then feel free to split the patch in
two. Simply dropping attribution in both cover letter and commit just
because I didn't get around yet to sending a v2 with those requests
addressed is not nice!
Patch 24/25 was done differently (calling realized = true from init
rather than the other way around) so this comment only applies to 23/25.
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- [Qemu-devel] [PATCH 09/25] qdev: move bus properties to a separate global, (continued)
- [Qemu-devel] [PATCH 09/25] qdev: move bus properties to a separate global, Paolo Bonzini, 2012/04/03
- [Qemu-devel] [PATCH 10/25] qdev: do not propagate properties to subclasses, Paolo Bonzini, 2012/04/03
- [Qemu-devel] [PATCH 11/25] qdev: pick global properties from superclasses, Paolo Bonzini, 2012/04/03
- [Qemu-devel] [PATCH 12/25] qdev: factor setting of global properties, Paolo Bonzini, 2012/04/03
- [Qemu-devel] [PATCH 13/25] qdev: replace bus properties with superclass properties, Paolo Bonzini, 2012/04/03
- [Qemu-devel] [PATCH 14/25] qapi: add Visitor interfaces for uint*_t and int*_t, Paolo Bonzini, 2012/04/03
- [Qemu-devel] [PATCH 15/25] qdev: use int32_t container for devfn property, Paolo Bonzini, 2012/04/03
- [Qemu-devel] [PATCH 17/25] qdev: remove PropertyInfo range checking, Paolo Bonzini, 2012/04/03
- [Qemu-devel] [PATCH 19/25] qom: push state up to Object, Paolo Bonzini, 2012/04/03
- [Qemu-devel] [PATCH 23/25] qom: add realized property, Paolo Bonzini, 2012/04/03
- Re: [Qemu-devel] [PATCH 23/25] qom: add realized property,
Andreas Färber <=
- Re: [Qemu-devel] [PATCH 23/25] qom: add realized property, Paolo Bonzini, 2012/04/03
- Re: [Qemu-devel] [PATCH 23/25] qom: add realized property, Andreas Färber, 2012/04/05
- Re: [Qemu-devel] [PATCH 23/25] qom: add realized property, Paolo Bonzini, 2012/04/05
- Re: [Qemu-devel] [PATCH 23/25] qom: add realized property, Andreas Färber, 2012/04/05
- Re: [Qemu-devel] [PATCH 23/25] qom: add realized property, Paolo Bonzini, 2012/04/05
- Re: [Qemu-devel] [PATCH 23/25] qom: add realized property, Anthony Liguori, 2012/04/05
[Qemu-devel] [PATCH 24/25] qdev: implement qdev_init on top of realize, Paolo Bonzini, 2012/04/03
[Qemu-devel] [PATCH 18/25] qdev: remove qdev_prop_exists, Paolo Bonzini, 2012/04/03
[Qemu-devel] [PATCH 20/25] qdev: generalize properties to Objects, Paolo Bonzini, 2012/04/03
[Qemu-devel] [PATCH 25/25] qdev: split part of device_finalize to device_unrealize, Paolo Bonzini, 2012/04/03