From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52308) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcaJk-0008QP-FT for qemu-devel@nongnu.org; Wed, 24 Aug 2016 11:42:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bcaJf-0000nR-PM for qemu-devel@nongnu.org; Wed, 24 Aug 2016 11:42:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33556) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcaJf-0000nB-Ji for qemu-devel@nongnu.org; Wed, 24 Aug 2016 11:42:11 -0400 Date: Wed, 24 Aug 2016 16:42:05 +0100 From: "Dr. David Alan Gilbert" Message-ID: <20160824154205.GF2032@work-vm> References: <1472046153-22123-1-git-send-email-dgilbert@redhat.com> <1472046153-22123-5-git-send-email-dgilbert@redhat.com> <20160824172911.4bf037c8.cornelia.huck@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160824172911.4bf037c8.cornelia.huck@de.ibm.com> Subject: Re: [Qemu-devel] [RFC 4/6] virtio/migration: Add VMStateDescription to VirtioDeviceClass List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck Cc: qemu-devel@nongnu.org, mst@redhat.com, amit.shah@redhat.com, quintela@redhat.com, duanj@linux.vnet.ibm.com * Cornelia Huck (cornelia.huck@de.ibm.com) wrote: > On Wed, 24 Aug 2016 14:42:31 +0100 > "Dr. David Alan Gilbert (git)" wrote: > > > From: "Dr. David Alan Gilbert" > > > > 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 > > --- > > 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 / dgilbert@redhat.com / Manchester, UK