From a23a6d183986ef38b705e85cabdd2af6cdc95276 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Wed, 12 Apr 2017 15:53:12 +0200 Subject: 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 Reviewed-by: Amit Shah Reviewed-by: Stefan Hajnoczi Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- include/hw/virtio/virtio-rng.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/hw/virtio/virtio-rng.h b/include/hw/virtio/virtio-rng.h index 2d40abdbdb..922dce7cac 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 -- cgit v1.2.3