[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] qom: Introduce object_realize_nofail()
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v2] qom: Introduce object_realize_nofail() |
Date: |
Thu, 12 Apr 2012 17:15:02 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 |
Il 12/04/2012 15:58, Andreas Färber ha scritto:
> The big clash that Paolo and I had turned out to stem from tackling two
> virtually inconsolable goals, both under the banner of "realize":
I think the code was similar enough that the goals are not
unreconcilable (though QOM goals can certainly become sad if they aren't
achieved in a few years :).
> 1) Me and Peter need a way to do two-stage construction of non-qdev
> objects. Inlining the below code into lots of machine init functions is
> a really bad suggestion IMO.
FWIW, I agree.
> I don't see 2) working at this stage due to the very simple fact that we
> create objects in the second stage depending on properties.
Do you have examples? As long as the objects are created in the realize
method itself you can do that.
> The one-realize model is also incompatible with the static properties
> concept that Paolo is moving into object in this series - we'd need to
> make them dynamic properties that actually do something when set (e.g.,
> modify the offset of a particular child MemoryRegion).
The child MemoryRegion could be created at realize time as long as the
composition tree hierarchy is correct. A child's MR can use a MR
property that the parent creates at realize time, because the parent is
always realized first and unrealized last.
Some properties however might need to become dynamic, for example a
SOC's number_of_uarts property would create children before realization.
> i) Moving vcpu_init() from cpu_*_init() into a realizefn.
This is compatible with realize-once-at-machine-creation.
> ii) Instantiating an SoC container object with varying CPU.
This seems similar to the MemoryRegion case.
> iii) Moving ARM feature inference into a realizefn.
I don't know anything at all about this. :)
If you need it as a stopgap measure, you could have cpu_realize_nofail
in qom/cpu.h. I wouldn't at all oppose to that. But it shouldn't be
encouraged, IMO.
Paolo
- [Qemu-devel] [PATCH v2 18/24] qdev: push state up to Object, (continued)
- [Qemu-devel] [PATCH v2 18/24] qdev: push state up to Object, Paolo Bonzini, 2012/04/11
- [Qemu-devel] [PATCH v2 23/24] qdev: implement qdev_init on top of realize, Paolo Bonzini, 2012/04/11
- [Qemu-devel] [PATCH v2 24/24] qdev: split part of device_finalize to device_unrealize, Paolo Bonzini, 2012/04/11
- [Qemu-devel] [PATCH v2 21/24] qom: push static properties to Object, Paolo Bonzini, 2012/04/11
- [Qemu-devel] [PATCH v2 20/24] qdev: move bulk of qdev-properties.c to qom/object.c, Paolo Bonzini, 2012/04/11
- [Qemu-devel] [PATCH v2 22/24] qom: add realized property, Paolo Bonzini, 2012/04/11
- [Qemu-devel] [PATCH v2 19/24] qdev: generalize properties to Objects, Paolo Bonzini, 2012/04/11
- [Qemu-devel] [PATCH v2] qom: Introduce object_realize_nofail(), Andreas Färber, 2012/04/12
- Re: [Qemu-devel] [PATCH v2] qom: Introduce object_realize_nofail(), Anthony Liguori, 2012/04/12
- Re: [Qemu-devel] [PATCH v2] qom: Introduce object_realize_nofail(), Andreas Färber, 2012/04/12
- Re: [Qemu-devel] [PATCH v2] qom: Introduce object_realize_nofail(),
Paolo Bonzini <=
- Re: [Qemu-devel] [PATCH v2] qom: Introduce object_realize_nofail(), Anthony Liguori, 2012/04/12
- Re: [Qemu-devel] [PATCH v2] qom: Introduce object_realize_nofail(), Peter Maydell, 2012/04/12
- Re: [Qemu-devel] [PATCH v2] qom: Introduce object_realize_nofail(), Anthony Liguori, 2012/04/12
- Re: [Qemu-devel] [PATCH v2] qom: Introduce object_realize_nofail(), Peter Maydell, 2012/04/12
- Re: [Qemu-devel] [PATCH v2] qom: Introduce object_realize_nofail(), Paolo Bonzini, 2012/04/12
- Re: [Qemu-devel] [PATCH v2] qom: Introduce object_realize_nofail(), Anthony Liguori, 2012/04/12
- Re: [Qemu-devel] [PATCH v2] qom: Introduce object_realize_nofail(), Andreas Färber, 2012/04/12
- Re: [Qemu-devel] [PATCH v2] qom: Introduce object_realize_nofail(), Paolo Bonzini, 2012/04/12
- Re: [Qemu-devel] [PATCH v2] qom: Introduce object_realize_nofail(), Andreas Färber, 2012/04/12
- Re: [Qemu-devel] [PATCH v2] qom: Introduce object_realize_nofail(), Anthony Liguori, 2012/04/12