Re: Infinite loop in bus_unparent(), qdev bug or qdev misuse?

2020-05-12 Thread Paolo Bonzini
On 12/05/20 17:58, Markus Armbruster wrote: > > Moving "put on qbus" from qdev_create() (and its wrappers) to > qdev_init_nofail() means we put on bus by realizing. No use to > recursive realization then, ... for qdev_init_nofail; it may still be useful to *replace* qdev_init_nofail with

Re: Infinite loop in bus_unparent(), qdev bug or qdev misuse?

2020-05-12 Thread Markus Armbruster
Markus Armbruster writes: > Paolo Bonzini writes: > >> On 05/05/20 18:03, Markus Armbruster wrote: That's a good one, and especially a safe one, since it matches qdev_device_add. It has the disadvantage of having to touch all qdev_create() calls. >>> >>> Also, it moves onboard

Re: Infinite loop in bus_unparent(), qdev bug or qdev misuse?

2020-05-06 Thread Markus Armbruster
Paolo Bonzini writes: > On 05/05/20 18:03, Markus Armbruster wrote: >>> That's a good one, and especially a safe one, since it matches >>> qdev_device_add. It has the disadvantage of having to touch all >>> qdev_create() calls. >> >> Also, it moves onboard devices from /machine/unattached/ to

Re: Infinite loop in bus_unparent(), qdev bug or qdev misuse?

2020-05-05 Thread Paolo Bonzini
On 05/05/20 18:03, Markus Armbruster wrote: >> That's a good one, and especially a safe one, since it matches >> qdev_device_add. It has the disadvantage of having to touch all >> qdev_create() calls. > > Also, it moves onboard devices from /machine/unattached/ to > /machine/peripheral-anon/.

Re: Infinite loop in bus_unparent(), qdev bug or qdev misuse?

2020-05-05 Thread Markus Armbruster
Paolo Bonzini writes: > On 04/05/20 16:38, Markus Armbruster wrote: >> makes no progreess because OBJECT(dev)->parent is still null, and >> therefore object_unparent() does nothing. >> >> Possible culprit: qdev_try_create() calls qdev_set_parent_bus(), which >> adds the device to the bus, but

Re: Infinite loop in bus_unparent(), qdev bug or qdev misuse?

2020-05-05 Thread no-reply
Patchew URL: https://patchew.org/QEMU/87tv0vzrwj@dusky.pond.sub.org/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN ===

Re: Infinite loop in bus_unparent(), qdev bug or qdev misuse?

2020-05-05 Thread no-reply
Patchew URL: https://patchew.org/QEMU/87tv0vzrwj@dusky.pond.sub.org/ Hi, This series failed build test on FreeBSD host. Please find the details below. === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git checkout with # HEAD pointing to a commit that has

Re: Infinite loop in bus_unparent(), qdev bug or qdev misuse?

2020-05-04 Thread Peter Maydell
On Mon, 4 May 2020 at 16:11, Paolo Bonzini wrote: > > On 04/05/20 16:38, Markus Armbruster wrote: > > makes no progreess because OBJECT(dev)->parent is still null, and > > therefore object_unparent() does nothing. > > > > Possible culprit: qdev_try_create() calls qdev_set_parent_bus(), which > >

Re: Infinite loop in bus_unparent(), qdev bug or qdev misuse?

2020-05-04 Thread Paolo Bonzini
On 04/05/20 16:38, Markus Armbruster wrote: > makes no progreess because OBJECT(dev)->parent is still null, and > therefore object_unparent() does nothing. > > Possible culprit: qdev_try_create() calls qdev_set_parent_bus(), which > adds the device to the bus, but leaves ->parent null. If this

Infinite loop in bus_unparent(), qdev bug or qdev misuse?

2020-05-04 Thread Markus Armbruster
I stumbled over this while working on a feature branch. Instead of throwing the whole branch at you as a reproducer, I give you a mock up. This is fdctrl_connect_drives(): dev = qdev_create(>bus.bus, "floppy"); qdev_prop_set_uint32(dev, "unit", i);