Il 16/04/2014 19:20, Andreas Färber ha scritto:
qdev paths used for VMState currently still depend on a bus, which Alex or Alexey wanted to look into fixing. By default -1 is supplied by DeviceState for registering dc->vmsd, which can be overridden by inlining the corresponding qdev.c code or more conveniently - Alex' suggestion yesterday - by moving that default value of -1 into an overrideable instance field.
Or even better, do not use the instance_id. It is prone to break when you have hotplug (because instance_ids on the source and destination might be different). instance_ids work for sysbus, but for everything else they'd better be avoided.
In order to migrate hotpluggable busless devices, we will need an alternative, device-based implementation of qdev_get_dev_path.
DIMM will be the first example of a hotpluggable busless device, but I think it is stateless so the problem will not be there.
Paolo