[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 4/6] virtio/migration: Add VMStateDescription to V
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] [RFC 4/6] virtio/migration: Add VMStateDescription to VirtioDeviceClass |
Date: |
Wed, 24 Aug 2016 17:29:11 +0200 |
On Wed, 24 Aug 2016 14:42:31 +0100
"Dr. David Alan Gilbert (git)" <address@hidden> wrote:
> From: "Dr. David Alan Gilbert" <address@hidden>
>
> 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 <address@hidden>
> ---
> hw/virtio/virtio.c | 11 +++++++++++
> include/hw/virtio/virtio.h | 2 ++
> 2 files changed, 13 insertions(+)
>
> diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
> index d2490c1..fd386ac 100644
> --- a/include/hw/virtio/virtio.h
> +++ b/include/hw/virtio/virtio.h
> @@ -124,8 +124,10 @@ typedef struct VirtioDeviceClass {
> * must mask in frontend instead.
> */
> void (*guest_notifier_mask)(VirtIODevice *vdev, int n, bool mask);
> + /* Saving and loading of a device; use *either* save/load OR vmsd */
Should we try to enforce this in some way? Then virtio_{save,load} can
call either/or instead of fallthrough which may have unintended
consequences...
> 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,
- [Qemu-devel] [RFC 0/6] converting some of virtio to VMState, Dr. David Alan Gilbert (git), 2016/08/24
- [Qemu-devel] [RFC 6/6] virtio/migration: Migrate virtio-net to VMState, Dr. David Alan Gilbert (git), 2016/08/24
- [Qemu-devel] [RFC 1/6] migration: report an error giving the failed field, Dr. David Alan Gilbert (git), 2016/08/24
- [Qemu-devel] [RFC 5/6] virtio/migration: Migrate balloon to VMState, Dr. David Alan Gilbert (git), 2016/08/24
- Re: [Qemu-devel] [RFC 0/6] converting some of virtio to VMState, Cornelia Huck, 2016/08/24