|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH v1 1/3] qdev: Expose the qdev id string as a prop |
Date: | Wed, 30 Apr 2014 12:16:39 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |