qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] runstate: do not discard runstate changes when paus


From: Paolo Bonzini
Subject: [Qemu-devel] [PATCH] runstate: do not discard runstate changes when paused
Date: Tue, 4 Oct 2011 14:04:45 +0200

Trying to migrate a paused machine fails.  The reason is that
the RSTATE_PRE_MIGRATE is reached with vm_stop, and this
transition is eaten when the vm is already paused.  This patch
fixes the problem by always going through runstate_set and
always notifying the new state.

Signed-off-by: Paolo Bonzini <address@hidden>
---
 cpus.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/cpus.c b/cpus.c
index 8978779..eab8ff6 100644
--- a/cpus.c
+++ b/cpus.c
@@ -128,6 +128,8 @@ static void do_vm_stop(RunState state)
         qemu_aio_flush();
         bdrv_flush_all();
         monitor_protocol_event(QEVENT_STOP, NULL);
+    } else {
+        runstate_set(state);
     }
 }
 
-- 
1.7.6




reply via email to

[Prev in Thread] Current Thread [Next in Thread]