Am 12.12.2012 18:53, schrieb Andreas Färber: > Finally supplying a public device_initialize() or so would be helpful > for the latter since VMState cannot cross pointers IIRC. I'll look into > that part since inlining the old qdev functions cripples my Tegra work.
Investigating this, it turned out that my branch was outdated in still calling qdev_prop_set_globals(), which some good soul (Paolo?) inlined into device initfn. So the only step taken by qdev_try_create() that remains after object_initialize() is qdev_set_parent_bus(), which I think does not warrant a device_post_initialize: -> qdev_set_parent_bus() qdev_try_create: -> object_new() -> device_post_initialize() qdev_create: -> qdev_try_create() device_initialize: -> object_initialize() -> device_post_initialize() construction. So, given that virtio device states are in (or moved to) a header, they can already be embedded in a has-a virtio-bus has-a Virtio*Device device today and initialized with object_initialize(&s->the_device) and qdev_set_parent_bus(&s->the_device, &s->the_virtio_bus). Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg