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: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v2] qom: Introduce object_realize_nofail()
Date: Thu, 12 Apr 2012 19:02:27 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1

Il 12/04/2012 18:52, Andreas Färber ha scritto:
>> Selecting the type of an object should be done by having a link<>
>> property and letting the user create an object and setup the link.
> 
> No, that's not what a link does. A link<> property lets the user
> associate one instance, not a type that can be used for multiple
> instances. We'd need a template<> or clone<> mechanism for that!
> 
> For example, the user specifies -cpu cortex-a9,+neon,-fpu and we have a
> dual-core exynos4210 SoC.
> 
> I originally had a patch on my qom-cpu-sh4 v1 series where exactly such
> a link got criticized by Peter:
> 
> http://patchwork.ozlabs.org/patch/146669/
> 
> And I agree, it was an ugly workaround around the missing two-stage
> constructor support. Therefore I had posted my object_realize() series!

I think this is difficult to reconcile for now.  I can see Anthony's
point, which makes a lot of sense from the PC point of view, but then
"magic" configuration can also be important when working with SoC boards.

I've added a missing_property hook to my series that can be used to this
end.  Accessing a property can trigger creation of the device with the
appropriate class before realization.

Paolo



reply via email to

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