Eduardo Habkost <ehabk...@redhat.com> writes: > This series moves some qdev code outside qdev.o, so it can be > compiled only in CONFIG_SOFTMMU. > > The code being moved includes two qdev_get_machine() calls, so > this will make it easier to move qdev_get_machine() to > CONFIG_SOFTMMU later. > > After this series, there's one remaining qdev_get_machine() call > that seems more difficult to remove: > > static void device_set_realized(Object *obj, bool value, Error **errp) > { > /* [...] */ > if (!obj->parent) { > gchar *name = g_strdup_printf("device[%d]", unattached_count++); > > object_property_add_child(container_get(qdev_get_machine(), > "/unattached"), > name, obj, &error_abort); > unattached_parent = true; > g_free(name); > } > /* [...] */ > } > > This one is tricky because on system emulation mode it needs > "/machine" to already exist, but in user-only mode it needs to > implicitly create a "/machine" container.
The patches look good to me on a glance. Looking forward to v2.