On Thu, 14 Feb 2019 17:58:06 +0100
Paolo Bonzini wrote:
> On 14/02/19 17:21, Markus Armbruster wrote:
> > * As an interim step, the #DeviceState:realized property can also be
> > * set with qdev_init_nofail().
> > * In the future, devices will propagate this state change to their children
> >
Peter Maydell writes:
> On Thu, 14 Feb 2019 at 16:21, Markus Armbruster wrote:
>>
>> One of qdev's perennial sources of confusion is what to do at object
>> instantiation time, i.e. in TypeInfo::instance_init(), and what to do at
>> device realization time, i.e. in DeviceClass::realize().
>
>
On 18/02/19 17:01, Markus Armbruster wrote:
>
> Out of curiosity, what would have to be done? Any particular problems
> other than the practical problem of manhandling 300+ qdev_init_nofail()
> calls?
Well, that's the problem. No one knows what would break, if anything.
Paolo
Paolo Bonzini writes:
> On 14/02/19 17:21, Markus Armbruster wrote:
>> * As an interim step, the #DeviceState:realized property can also be
>> * set with qdev_init_nofail().
>> * In the future, devices will propagate this state change to their children
>> * and along busses they expose.
>>
On 14/02/2019 17.33, Peter Maydell wrote:
> On Thu, 14 Feb 2019 at 16:21, Markus Armbruster wrote:
>>
>> One of qdev's perennial sources of confusion is what to do at object
>> instantiation time, i.e. in TypeInfo::instance_init(), and what to do at
>> device realization time, i.e. in
On 14/02/19 17:21, Markus Armbruster wrote:
> * As an interim step, the #DeviceState:realized property can also be
> * set with qdev_init_nofail().
> * In the future, devices will propagate this state change to their children
> * and along busses they expose.
>
> This sentence is five years
On Thu, 14 Feb 2019 at 16:21, Markus Armbruster wrote:
>
> One of qdev's perennial sources of confusion is what to do at object
> instantiation time, i.e. in TypeInfo::instance_init(), and what to do at
> device realization time, i.e. in DeviceClass::realize().
Thanks for opening this topic.
One of qdev's perennial sources of confusion is what to do at object
instantiation time, i.e. in TypeInfo::instance_init(), and what to do at
device realization time, i.e. in DeviceClass::realize(). qdev-core.h's
comment falls short:
* # Realization #
* Devices are constructed in two stages,