[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 16/37] virtio-serial: don't migrate the config space
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 16/37] virtio-serial: don't migrate the config space |
Date: |
Sun, 29 Jun 2014 19:58:59 +0300 |
From: Alexander Graf <address@hidden>
The device configuration is set at realize time and never changes. It
should not be migrated as it is done today. For the sake of compatibility,
let's just skip them at load time.
Signed-off-by: Alexander Graf <address@hidden>
[ added missing casts to uint16_t *,
added From, SoB and commit message,
Greg Kurz <address@hidden> ]
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Greg Kurz <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/char/virtio-serial-bus.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c
index a2958ff..e2174b1 100644
--- a/hw/char/virtio-serial-bus.c
+++ b/hw/char/virtio-serial-bus.c
@@ -663,6 +663,7 @@ static int virtio_serial_load(QEMUFile *f, void *opaque,
int version_id)
uint32_t max_nr_ports, nr_active_ports, ports_map;
unsigned int i;
int ret;
+ uint32_t tmp;
if (version_id > 3) {
return -EINVAL;
@@ -678,17 +679,12 @@ static int virtio_serial_load(QEMUFile *f, void *opaque,
int version_id)
return 0;
}
- /* The config space */
- qemu_get_be16s(f, &s->config.cols);
- qemu_get_be16s(f, &s->config.rows);
-
- qemu_get_be32s(f, &max_nr_ports);
- tswap32s(&max_nr_ports);
- if (max_nr_ports > tswap32(s->config.max_nr_ports)) {
- /* Source could have had more ports than us. Fail migration. */
- return -EINVAL;
- }
+ /* Unused */
+ qemu_get_be16s(f, (uint16_t *) &tmp);
+ qemu_get_be16s(f, (uint16_t *) &tmp);
+ qemu_get_be32s(f, &tmp);
+ max_nr_ports = tswap32(s->config.max_nr_ports);
for (i = 0; i < (max_nr_ports + 31) / 32; i++) {
qemu_get_be32s(f, &ports_map);
--
MST
- [Qemu-devel] [PULL 05/37] pc: Fix "prog_if" typo on PC_COMPAT_2_0, (continued)
- [Qemu-devel] [PULL 05/37] pc: Fix "prog_if" typo on PC_COMPAT_2_0, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 07/37] vhost-user: fix wrong ids in documentation, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 09/37] Allow mismatched virtio config-len, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 11/37] numa: Reject duplicate node IDs, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 10/37] numa: Keep track of NUMA nodes present on the command-line, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 12/37] numa: Reject configuration if not all node IDs are present, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 13/37] vhost-user: fix regions provied with VHOST_USER_SET_MEM_TABLE message, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 14/37] vhost-user: typo fixups, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 15/37] virtio-net: byteswap virtio-net header, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 17/37] virtio: introduce device specific migration calls, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 16/37] virtio-serial: don't migrate the config space,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 18/37] virtio-net: implement per-device migration calls, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 19/37] virtio-blk: implement per-device migration calls, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 20/37] virtio-serial: implement per-device migration calls, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 21/37] virtio-balloon: implement per-device migration calls, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 22/37] virtio-rng: implement per-device migration calls, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 23/37] virtio: add subsections to the migration stream, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 24/37] exec: introduce target_words_bigendian() helper, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 25/37] cpu: introduce CPUClass::virtio_is_big_endian(), Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 26/37] virtio: add endian-ambivalent support to VirtIODevice, Michael S. Tsirkin, 2014/06/29
- [Qemu-devel] [PULL 27/37] virtio: memory accessors for endian-ambivalent targets, Michael S. Tsirkin, 2014/06/29