[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL v3 for-2.4 08/11] virtio-ccw: migrate ->revision
From: |
Christian Borntraeger |
Subject: |
Re: [Qemu-devel] [PULL v3 for-2.4 08/11] virtio-ccw: migrate ->revision |
Date: |
Tue, 07 Jul 2015 13:32:38 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
Am 02.07.2015 um 16:10 schrieb Cornelia Huck:
> We need to migrate the revision field as well. No compatibility
> concerns as we already introduced migration of ->config_vector in
> this release.
>
> Signed-off-by: Cornelia Huck <address@hidden>
> ---
> hw/s390x/virtio-ccw.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
> index 8597ac4..d631337 100644
> --- a/hw/s390x/virtio-ccw.c
> +++ b/hw/s390x/virtio-ccw.c
> @@ -1472,6 +1472,7 @@ static void virtio_ccw_save_config(DeviceState *d,
> QEMUFile *f)
> qemu_put_be16(f, vdev->config_vector);
> qemu_put_be64(f, dev->routes.adapter.ind_offset);
> qemu_put_byte(f, dev->thinint_isc);
> + qemu_put_be32(f, dev->revision);
> }
>
> static int virtio_ccw_load_config(DeviceState *d, QEMUFile *f)
> @@ -1512,6 +1513,7 @@ static int virtio_ccw_load_config(DeviceState *d,
> QEMUFile *f)
> dev->thinint_isc, true, false,
> &dev->routes.adapter.adapter_id);
> }
> + dev->revision = qemu_get_be32(f);
>
> return 0;
> }
>
This broke migration:
2015-07-07T11:22:55.570968Z qemu-system-s390x: VQ 39 address 0x0 inconsistent
with Host index 0x100
2015-07-07T11:22:55.571008Z qemu-system-s390x: error while loading state for
instance 0x0 of
Seems that revision is used before it is loaded, something like
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index d631337..f524140 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -1448,6 +1448,7 @@ static void virtio_ccw_save_config(DeviceState *d,
QEMUFile *f)
VirtIODevice *vdev = virtio_ccw_get_vdev(s);
subch_device_save(s, f);
+ qemu_put_be32(f, dev->revision);
if (dev->indicators != NULL) {
qemu_put_be32(f, dev->indicators->len);
qemu_put_be64(f, dev->indicators->addr);
@@ -1472,7 +1473,6 @@ static void virtio_ccw_save_config(DeviceState *d,
QEMUFile *f)
qemu_put_be16(f, vdev->config_vector);
qemu_put_be64(f, dev->routes.adapter.ind_offset);
qemu_put_byte(f, dev->thinint_isc);
- qemu_put_be32(f, dev->revision);
}
static int virtio_ccw_load_config(DeviceState *d, QEMUFile *f)
@@ -1484,6 +1484,7 @@ static int virtio_ccw_load_config(DeviceState *d,
QEMUFile *f)
s->driver_data = dev;
subch_device_load(s, f);
+ dev->revision = qemu_get_be32(f);
len = qemu_get_be32(f);
if (len != 0) {
dev->indicators = get_indicator(qemu_get_be64(f), len);
@@ -1513,7 +1514,6 @@ static int virtio_ccw_load_config(DeviceState *d,
QEMUFile *f)
dev->thinint_isc, true, false,
&dev->routes.adapter.adapter_id);
}
- dev->revision = qemu_get_be32(f);
return 0;
}
Seems to do the trick.
- [Qemu-devel] [PULL v3 for-2.4 00/11] s390x patches for 2.4, Cornelia Huck, 2015/07/02
- [Qemu-devel] [PULL v3 for-2.4 01/11] virtio-ccw: complete handling of guest-initiated resets, Cornelia Huck, 2015/07/02
- [Qemu-devel] [PULL v3 for-2.4 02/11] css: mss/mcss-e vs. migration, Cornelia Huck, 2015/07/02
- [Qemu-devel] [PULL v3 for-2.4 03/11] s390-ccw.img: Consume service interrupts, Cornelia Huck, 2015/07/02
- [Qemu-devel] [PULL v3 for-2.4 04/11] s390-ccw.img: update, Cornelia Huck, 2015/07/02
- [Qemu-devel] [PULL v3 for-2.4 08/11] virtio-ccw: migrate ->revision, Cornelia Huck, 2015/07/02
- Re: [Qemu-devel] [PULL v3 for-2.4 08/11] virtio-ccw: migrate ->revision,
Christian Borntraeger <=
- [Qemu-devel] [PULL v3 for-2.4 07/11] s390x/virtio-ccw: support virtio-1 set_vq format, Cornelia Huck, 2015/07/02
- [Qemu-devel] [PULL v3 for-2.4 05/11] s390x/css: Add a callback for when subchannel gets disabled, Cornelia Huck, 2015/07/02
- [Qemu-devel] [PULL v3 for-2.4 06/11] s390x/virtio-ccw: add virtio set-revision call, Cornelia Huck, 2015/07/02
- [Qemu-devel] [PULL v3 for-2.4 09/11] s390x/ipl: Fix boot if no bootindex was specified, Cornelia Huck, 2015/07/02
- [Qemu-devel] [PULL v3 for-2.4 10/11] s390x/gdb: synchronize cpu state after modifying acrs, Cornelia Huck, 2015/07/02
- [Qemu-devel] [PULL v3 for-2.4 11/11] s390x/migration: Introduce 2.4 machine, Cornelia Huck, 2015/07/02
- Re: [Qemu-devel] [PULL v3 for-2.4 00/11] s390x patches for 2.4, Peter Maydell, 2015/07/02