* Cornelia Huck (cornelia.h...@de.ibm.com) wrote:
> On Wed, 24 Aug 2016 14:42:31 +0100
> "Dr. David Alan Gilbert (git)" <dgilb...@redhat.com> wrote:
> 
> > From: "Dr. David Alan Gilbert" <dgilb...@redhat.com>
> > 
> > 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 <dgilb...@redhat.com>
> > ---
> >  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 / dgilb...@redhat.com / Manchester, UK

Reply via email to