Re: [Qemu-devel] Object instantiation vs. device realization: what to do when?

2019-02-19 Thread Igor Mammedov
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 > >

Re: [Qemu-devel] Object instantiation vs. device realization: what to do when?

2019-02-18 Thread Markus Armbruster
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(). > >

Re: [Qemu-devel] Object instantiation vs. device realization: what to do when?

2019-02-18 Thread Paolo Bonzini
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

Re: [Qemu-devel] Object instantiation vs. device realization: what to do when?

2019-02-18 Thread Markus Armbruster
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. >>

Re: [Qemu-devel] Object instantiation vs. device realization: what to do when?

2019-02-14 Thread Thomas Huth
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

Re: [Qemu-devel] Object instantiation vs. device realization: what to do when?

2019-02-14 Thread Paolo Bonzini
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

Re: [Qemu-devel] Object instantiation vs. device realization: what to do when?

2019-02-14 Thread Peter Maydell
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.

[Qemu-devel] Object instantiation vs. device realization: what to do when?

2019-02-14 Thread Markus Armbruster
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,