qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] qom: Introduce object_realize_nofail()


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH v2] qom: Introduce object_realize_nofail()
Date: Thu, 12 Apr 2012 15:58:00 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120312 Thunderbird/11.0

Am 12.04.2012 16:47, schrieb Anthony Liguori:
> On 04/12/2012 08:44 AM, Andreas Färber wrote:
>> Wrap setting of Object::realized property, error reporting and exit(1)
>> into a helper function. It is the equivalent of qdev_init_nofail().
> 
> I don't like this.
> 
> If for no reason other than, a much more specific justification is
> needed for this.  I absolutely don't want to repeat the error handling
> mistakes of qdev.  I would rather we refactor all of the users of
> qdev_init_nofail() to propagate errors.

I didn't get around to replying to your other mail yet:

The big clash that Paolo and I had turned out to stem from tackling two
virtually inconsolable goals, both under the banner of "realize":

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.

2) Paolo is working towards the model envisioned by you where only a
single realize call is made in vl.c and propagates to all children.

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. 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).

So unless all devices are reworked to fit into the envisioned realize
model, we will need some function like this.

Current pressing use cases are:
i) Moving vcpu_init() from cpu_*_init() into a realizefn.
ii) Instantiating an SoC container object with varying CPU.
iii) Moving ARM feature inference into a realizefn.

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

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