qemu-devel
[Top][All Lists]
Advanced

[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: Dr. David Alan Gilbert
Subject: Re: [Qemu-devel] [RFC 4/6] virtio/migration: Add VMStateDescription to VirtioDeviceClass
Date: Wed, 24 Aug 2016 16:42:05 +0100
User-agent: Mutt/1.6.2 (2016-07-01)

* Cornelia Huck (address@hidden) wrote:
> 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...

I was thinking of doing that; but my intention is to kill off the save/load
methods ASAP.

Dave

> 
> >      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,
> 
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK



reply via email to

[Prev in Thread] Current Thread [Next in Thread]