All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: qemu-devel@nongnu.org, mst@redhat.com, amit.shah@redhat.com,
	quintela@redhat.com, duanj@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [RFC 4/6] virtio/migration: Add VMStateDescription to VirtioDeviceClass
Date: Wed, 24 Aug 2016 16:42:05 +0100	[thread overview]
Message-ID: <20160824154205.GF2032@work-vm> (raw)
In-Reply-To: <20160824172911.4bf037c8.cornelia.huck@de.ibm.com>

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

  reply	other threads:[~2016-08-24 15:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-24 13:42 [Qemu-devel] [RFC 0/6] converting some of virtio to VMState Dr. David Alan Gilbert (git)
2016-08-24 13:42 ` [Qemu-devel] [RFC 1/6] migration: report an error giving the failed field Dr. David Alan Gilbert (git)
2016-08-24 13:42 ` [Qemu-devel] [RFC 2/6] migration: Report values for comparisons Dr. David Alan Gilbert (git)
2016-08-24 13:42 ` [Qemu-devel] [RFC 3/6] migration: Add VMSTATE_UNUSED_VARRAY_UINT32 Dr. David Alan Gilbert (git)
2016-08-24 13:42 ` [Qemu-devel] [RFC 4/6] virtio/migration: Add VMStateDescription to VirtioDeviceClass Dr. David Alan Gilbert (git)
2016-08-24 15:29   ` Cornelia Huck
2016-08-24 15:42     ` Dr. David Alan Gilbert [this message]
2016-08-24 15:51       ` Cornelia Huck
2016-08-24 13:42 ` [Qemu-devel] [RFC 5/6] virtio/migration: Migrate balloon to VMState Dr. David Alan Gilbert (git)
2016-08-24 13:42 ` [Qemu-devel] [RFC 6/6] virtio/migration: Migrate virtio-net " Dr. David Alan Gilbert (git)
2016-08-24 15:34 ` [Qemu-devel] [RFC 0/6] converting some of virtio " Cornelia Huck
2016-08-24 16:20   ` Dr. David Alan Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160824154205.GF2032@work-vm \
    --to=dgilbert@redhat.com \
    --cc=amit.shah@redhat.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=duanj@linux.vnet.ibm.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.