On 13.07.2018 13:13, Paolo Bonzini wrote: > On 13/07/2018 10:27, Thomas Huth wrote: >> aux_create_slave() calls qdev_init_nofail() which in turn "realizes" >> the corresponding object. Thus this most not be called from an >> instance_init function. Move the code to the realize function instead. >> >> Signed-off-by: Thomas Huth <th...@redhat.com> >> --- >> hw/display/xlnx_dp.c | 23 +++++++++-------------- >> 1 file changed, 9 insertions(+), 14 deletions(-) > >> + s->aux_bus = aux_init_bus(dev, "aux"); > > aux_init_bus can remain in the same place, and likewise the qdev_create > that assigns to s->edid. > > The only thing that has to move is the qdev_init_nofail and > aux_bus_map_device, like this: > > ----------------- 8< ------------------ > From: Paolo Bonzini <pbonz...@redhat.com> > Subject: [PATCH] hw/display/xlnx_dp: Move problematic code from instance_init > to realize
Your patch looks good at a first quick glance, but it seems not to work as expected: When I now run QEMU like this: echo "{'execute':'qmp_capabilities'}" \ "{'execute':'device-list-properties'," \ "'arguments':{'typename':'xlnx,zynqmp'}}" \ "{'execute': 'human-monitor-command', " \ "'arguments': {'command-line': 'info qtree'}}" | \ aarch64-softmmu/qemu-system-aarch64 -M none,accel=qtest -qmp stdio then QEMU ends up in an endless loop and I've got to kill it. Thomas