aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2017-04-12 15:53:12 +0200
committerJuan Quintela <quintela@redhat.com>2017-04-21 12:25:40 +0200
commita23a6d183986ef38b705e85cabdd2af6cdc95276 (patch)
tree0ad20373e63146ce0ab1ef567fdd69533d0f1974 /include
parente8199e4895d34136735dea7e628d0de1a5afb630 (diff)
downloadqemu-a23a6d183986ef38b705e85cabdd2af6cdc95276.zip
qemu-a23a6d183986ef38b705e85cabdd2af6cdc95276.tar.gz
qemu-a23a6d183986ef38b705e85cabdd2af6cdc95276.tar.bz2
virtio-rng: stop virtqueue while the CPU is stopped
If we modify the virtio-rng virqueue while the vmstate is already migrated we can have some inconsistencies between the virtqueue state and the memory content. To avoid this, stop the virtqueue while the CPU is stopped. Signed-off-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Amit Shah <amit@kernel.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/virtio/virtio-rng.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio-rng.h b/include/hw/virtio/virtio-rng.h
index 2d40abd..922dce7 100644
--- a/include/hw/virtio/virtio-rng.h
+++ b/include/hw/virtio/virtio-rng.h
@@ -45,6 +45,8 @@ typedef struct VirtIORNG {
QEMUTimer *rate_limit_timer;
int64_t quota_remaining;
bool activate_timer;
+
+ VMChangeStateEntry *vmstate;
} VirtIORNG;
#endif