From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52203) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0AoE-00078K-38 for qemu-devel@nongnu.org; Wed, 03 Jun 2015 11:42:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0AoA-000754-RD for qemu-devel@nongnu.org; Wed, 03 Jun 2015 11:42:26 -0400 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:41452) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0AoA-00074Z-Ik for qemu-devel@nongnu.org; Wed, 03 Jun 2015 11:42:22 -0400 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 3 Jun 2015 16:42:21 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 6F4F4219005E for ; Wed, 3 Jun 2015 16:41:58 +0100 (BST) Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t53FgIhS24445150 for ; Wed, 3 Jun 2015 15:42:18 GMT Received: from d06av11.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t53FgHEX017063 for ; Wed, 3 Jun 2015 09:42:18 -0600 Message-ID: <556F2059.3070100@de.ibm.com> Date: Wed, 03 Jun 2015 17:42:17 +0200 From: Christian Borntraeger MIME-Version: 1.0 References: <1433343843-803-1-git-send-email-jjherne@linux.vnet.ibm.com> In-Reply-To: <1433343843-803-1-git-send-email-jjherne@linux.vnet.ibm.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] virtio-migration: Migrate config vector for virtio devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Jason J. Herne" , dahi@linux.vnet.ibm.com, amit.shah@redhat.com, dgilbert@redhat.com, quintela@redhat.com, qemu-devel@nongnu.org, cornelia.huck@de.ibm.com, mst@redhat.com, pbonzini@redhat.com Am 03.06.2015 um 17:04 schrieb Jason J. Herne: > 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 Will apply to my s390 branch with a slightly modified subject (virtio-ccw/migration:) and will add some explanation about how the machine cpu state version change between v2.3 and v2.4 will protect us. Thanks. > --- > 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) { >