[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH RFC 7/8] virtio-rng: migrate subsections
From: |
Greg Kurz |
Subject: |
[Qemu-devel] [PATCH RFC 7/8] virtio-rng: migrate subsections |
Date: |
Wed, 14 May 2014 17:42:23 +0200 |
User-agent: |
StGit/0.16 |
While we are here, we also check virtio_load() return value.
Signed-off-by: Greg Kurz <address@hidden>
---
hw/virtio/virtio-rng.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c
index b6ab361..0371103 100644
--- a/hw/virtio/virtio-rng.c
+++ b/hw/virtio/virtio-rng.c
@@ -103,17 +103,28 @@ static void virtio_rng_save(QEMUFile *f, void *opaque)
VirtIODevice *vdev = opaque;
virtio_save(vdev, f);
+ virtio_save_subsections(vdev, f);
}
static int virtio_rng_load(QEMUFile *f, void *opaque, int version_id)
{
VirtIORNG *vrng = opaque;
VirtIODevice *vdev = VIRTIO_DEVICE(vrng);
+ int ret;
if (version_id != 1) {
return -EINVAL;
}
- virtio_load(vdev, f);
+
+ ret = virtio_load(vdev, f);
+ if (ret) {
+ return ret;
+ }
+
+ ret = virtio_load_subsections(vdev, f);
+ if (ret) {
+ return ret;
+ }
/* We may have an element ready but couldn't process it due to a quota
* limit. Make sure to try again after live migration when the quota may
- 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, 2014/05/14
[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 <=
[Qemu-devel] [PATCH RFC 8/8] virtio: add endian-ambivalent support to VirtIODevice, Greg Kurz, 2014/05/14