summaryrefslogtreecommitdiffstats
path: root/include/hw/virtio
diff options
context:
space:
mode:
authorDr. David Alan Gilbert2016-10-27 19:36:36 +0200
committerMichael S. Tsirkin2016-10-30 18:51:31 +0100
commitea43e259873a9899227848bd2a24b57356395516 (patch)
tree688b0dac86fa197a3cc92702e838e31deda7db72 /include/hw/virtio
parentMerge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20161028-1' into st... (diff)
downloadqemu-ea43e259873a9899227848bd2a24b57356395516.tar.gz
qemu-ea43e259873a9899227848bd2a24b57356395516.tar.xz
qemu-ea43e259873a9899227848bd2a24b57356395516.zip
virtio/migration: Add VMStateDescription to VirtioDeviceClass
Provide a vmsd pointer for VirtIO devices to use instead of the load/save methods. We'll eventually kill off the load/save methods. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/virtio')
-rw-r--r--include/hw/virtio/virtio.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
index b913aac455..52d4b55fa6 100644
--- a/include/hw/virtio/virtio.h
+++ b/include/hw/virtio/virtio.h
@@ -125,8 +125,12 @@ typedef struct VirtioDeviceClass {
* must mask in frontend instead.
*/
void (*guest_notifier_mask)(VirtIODevice *vdev, int n, bool mask);
+ /* Saving and loading of a device; trying to deprecate save/load
+ * use vmsd for new devices.
+ */
void (*save)(VirtIODevice *vdev, QEMUFile *f);
int (*load)(VirtIODevice *vdev, QEMUFile *f, int version_id);
+ const VMStateDescription *vmsd;
} VirtioDeviceClass;
void virtio_instance_init_common(Object *proxy_obj, void *data,