All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Jason J. Herne" <jjherne@linux.vnet.ibm.com>
Cc: cornelia.huck@de.ibm.com, quintela@redhat.com,
	qemu-devel@nongnu.org, dgilbert@redhat.com,
	dahi@linux.vnet.ibm.com, amit.shah@redhat.com,
	pbonzini@redhat.com, borntraeger@de.ibm.com
Subject: Re: [Qemu-devel] [PATCH] virtio-migration: Migrate config vector for virtio devices
Date: Wed, 3 Jun 2015 17:44:10 +0200	[thread overview]
Message-ID: <20150603174405-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <1433343843-803-1-git-send-email-jjherne@linux.vnet.ibm.com>

On Wed, Jun 03, 2015 at 11:04:03AM -0400, Jason J. Herne wrote:
> virtio_ccw_{save|load}_config are missing code to save and restore a vdev's
> config_vector value. This causes some virtio devices to become disabled
> following a migration.
> 
> This patch fixes a bug whereby the qmp/hmp balloon command (virsh setmem)
> silently fails to update the guest's available memory because the device was not
> properly migrated.
> 
> Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com>

Reviewed-by: Michael S. Tsirkin <mst@redhat.com>

> ---
>  hw/s390x/virtio-ccw.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
> index ef90fed..05eaee2 100644
> --- a/hw/s390x/virtio-ccw.c
> +++ b/hw/s390x/virtio-ccw.c
> @@ -1310,6 +1310,7 @@ static void virtio_ccw_save_config(DeviceState *d, QEMUFile *f)
>  {
>      VirtioCcwDevice *dev = VIRTIO_CCW_DEVICE(d);
>      SubchDev *s = dev->sch;
> +    VirtIODevice *vdev = virtio_ccw_get_vdev(s);
>  
>      subch_device_save(s, f);
>      if (dev->indicators != NULL) {
> @@ -1333,6 +1334,7 @@ static void virtio_ccw_save_config(DeviceState *d, QEMUFile *f)
>          qemu_put_be32(f, 0);
>          qemu_put_be64(f, 0UL);
>      }
> +    qemu_put_be16(f, vdev->config_vector);
>      qemu_put_be64(f, dev->routes.adapter.ind_offset);
>      qemu_put_byte(f, dev->thinint_isc);
>  }
> @@ -1341,6 +1343,7 @@ static int virtio_ccw_load_config(DeviceState *d, QEMUFile *f)
>  {
>      VirtioCcwDevice *dev = VIRTIO_CCW_DEVICE(d);
>      SubchDev *s = dev->sch;
> +    VirtIODevice *vdev = virtio_ccw_get_vdev(s);
>      int len;
>  
>      s->driver_data = dev;
> @@ -1366,6 +1369,7 @@ static int virtio_ccw_load_config(DeviceState *d, QEMUFile *f)
>          qemu_get_be64(f);
>          dev->summary_indicator = NULL;
>      }
> +    qemu_get_be16s(f, &vdev->config_vector);
>      dev->routes.adapter.ind_offset = qemu_get_be64(f);
>      dev->thinint_isc = qemu_get_byte(f);
>      if (s->thinint_active) {
> -- 
> 1.9.1

      parent reply	other threads:[~2015-06-03 15:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-03 15:04 [Qemu-devel] [PATCH] virtio-migration: Migrate config vector for virtio devices Jason J. Herne
2015-06-03 15:42 ` Christian Borntraeger
2015-06-03 15:44   ` Michael S. Tsirkin
2015-06-03 15:44 ` Michael S. Tsirkin [this message]

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=20150603174405-mutt-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=amit.shah@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=dahi@linux.vnet.ibm.com \
    --cc=dgilbert@redhat.com \
    --cc=jjherne@linux.vnet.ibm.com \
    --cc=pbonzini@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.