[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH RFC 5/8] virtio-serial: migrate subsections
From: |
Greg Kurz |
Subject: |
[Qemu-devel] [PATCH RFC 5/8] virtio-serial: migrate subsections |
Date: |
Wed, 14 May 2014 17:42:08 +0200 |
User-agent: |
StGit/0.16 |
Signed-off-by: Greg Kurz <address@hidden>
---
hw/char/virtio-serial-bus.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c
index 2b647b6..98f32fd 100644
--- a/hw/char/virtio-serial-bus.c
+++ b/hw/char/virtio-serial-bus.c
@@ -522,12 +522,13 @@ static void vser_reset(VirtIODevice *vdev)
static void virtio_serial_save(QEMUFile *f, void *opaque)
{
VirtIOSerial *s = VIRTIO_SERIAL(opaque);
+ VirtIODevice *vdev = VIRTIO_DEVICE(s);
VirtIOSerialPort *port;
uint32_t nr_active_ports;
unsigned int i, max_nr_ports;
/* The virtio device */
- virtio_save(VIRTIO_DEVICE(s), f);
+ virtio_save(vdev, f);
/* The config space */
qemu_put_be16s(f, &s->config.cols);
@@ -573,6 +574,8 @@ static void virtio_serial_save(QEMUFile *f, void *opaque)
sizeof(port->elem));
}
}
+
+ virtio_save_subsections(vdev, f);
}
static void virtio_serial_post_load_timer_cb(void *opaque)
@@ -667,6 +670,7 @@ static int fetch_active_ports_list(QEMUFile *f, int
version_id,
static int virtio_serial_load(QEMUFile *f, void *opaque, int version_id)
{
VirtIOSerial *s = VIRTIO_SERIAL(opaque);
+ VirtIODevice *vdev = VIRTIO_DEVICE(s);
uint32_t max_nr_ports, nr_active_ports, ports_map;
unsigned int i;
int ret;
@@ -676,7 +680,7 @@ static int virtio_serial_load(QEMUFile *f, void *opaque,
int version_id)
}
/* The virtio device */
- ret = virtio_load(VIRTIO_DEVICE(s), f);
+ ret = virtio_load(vdev, f);
if (ret) {
return ret;
}
@@ -716,7 +720,7 @@ static int virtio_serial_load(QEMUFile *f, void *opaque,
int version_id)
return ret;
}
}
- return 0;
+ return virtio_load_subsections(vdev, f);
}
static void virtser_bus_dev_print(Monitor *mon, DeviceState *qdev, int indent);
- Re: [Qemu-devel] [PATCH RFC 1/8] virtio: add subsections to the migration stream, (continued)
- Re: [Qemu-devel] [PATCH RFC 1/8] virtio: add subsections to the migration stream, Michael S. Tsirkin, 2014/05/17
- Re: [Qemu-devel] [PATCH RFC 1/8] virtio: add subsections to the migration stream, Michael S. Tsirkin, 2014/05/15
- Re: [Qemu-devel] [PATCH RFC 1/8] virtio: add subsections to the migration stream, Greg Kurz, 2014/05/15
- Re: [Qemu-devel] [PATCH RFC 1/8] virtio: add subsections to the migration stream, Amit Shah, 2014/05/15
- Re: [Qemu-devel] [PATCH RFC 1/8] virtio: add subsections to the migration stream, Michael S. Tsirkin, 2014/05/15
[Qemu-devel] [PATCH RFC 2/8] virtio-net: migrate subsections, Greg Kurz, 2014/05/14
[Qemu-devel] [PATCH RFC 3/8] virtio-blk: migrate subsections, Greg Kurz, 2014/05/14
[Qemu-devel] [PATCH RFC 4/8] virtio-scsi: migrate subsections, Greg Kurz, 2014/05/14
[Qemu-devel] [PATCH RFC 5/8] virtio-serial: migrate subsections,
Greg Kurz <=
[Qemu-devel] [PATCH RFC 6/8] virtio-balloon: migrate subsections, Greg Kurz, 2014/05/14
[Qemu-devel] [PATCH RFC 7/8] virtio-rng: migrate subsections, Greg Kurz, 2014/05/14
[Qemu-devel] [PATCH RFC 8/8] virtio: add endian-ambivalent support to VirtIODevice, Greg Kurz, 2014/05/14