diff mbox

fix qemu-kvm sigsegv at exit

Message ID 20091026184602.GB6016@amt.cnet (mailing list archive)
State New, archived
Headers show

Commit Message

Marcelo Tosatti Oct. 26, 2009, 6:46 p.m. UTC
None
diff mbox

Patch

diff --git a/qemu-kvm.c b/qemu-kvm.c
index 4c13628..ab8f0e4 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -1868,7 +1868,8 @@  static int kvm_main_loop_cpu(CPUState *env)
         }
         if (run_cpu) {
             kvm_main_loop_wait(env, 0);
-            kvm_cpu_exec(env);
+            if (!is_cpu_stopped(env))
+                kvm_cpu_exec(env);
         } else {
             kvm_main_loop_wait(env, 1000);
         }