Thank you for addressing this. Similar patches were proposed and
weren't merged unfortunately.
The reason why the qdev_register_reset() in vl.c is to keep the reset order.
The reset for main_system_bus shouldn't registered by qbus_create_inplace().
But the check, bus != main_system_bus, doesn't work as intended because
main_system_bus is NULL in early qdev creation.
So there are possible ways for the fix.
- Don't care the reset order
your patch +
remove "if (bus != main_system_bus)" in qbus_create_inplace()
- keep the reset order
- instantiate main_system_bus early.
So the check, bus != main_system_bus in qbus_create_inplace(), will work.
or
- fix the check, bus != main_system_bus in qbus_create_inplace(), somehow
thanks,