Patchwork [6/6] Fix incoming migration with iothread

login
register
mail settings
Submitter Marcelo Tosatti
Date Feb. 3, 2010, 11:55 p.m.
Message ID <c5f32c99c6855d466737daf1cd262e7e92062f87.1265241351.git.mtosatti@redhat.com>
Download mbox | patch
Permalink /patch/44437/
State New
Headers show

Comments

Marcelo Tosatti - Feb. 3, 2010, 11:55 p.m.
Do not allow the vcpus to execute if the vm is stopped.

Fixes -incoming with CONFIG_IOTHREAD enabled.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
---
 vl.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Patch

diff --git a/vl.c b/vl.c
index 50f133d..57f0ba5 100644
--- a/vl.c
+++ b/vl.c
@@ -3282,6 +3282,8 @@  static int cpu_can_run(CPUState *env)
         return 0;
     if (env->stopped)
         return 0;
+    if (!vm_running)
+        return 0;
     return 1;
 }