diff mbox

[v2] fix qemu-kvm sigsegv at exit

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

Commit Message

Marcelo Tosatti Oct. 27, 2009, 3:33 p.m. UTC
None
diff mbox

Patch

diff --git a/qemu-kvm.c b/qemu-kvm.c
index 4c13628..809fd65 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -1867,8 +1867,8 @@  static int kvm_main_loop_cpu(CPUState *env)
             run_cpu = !env->halted;
         }
         if (run_cpu) {
-            kvm_main_loop_wait(env, 0);
             kvm_cpu_exec(env);
+            kvm_main_loop_wait(env, 0);
         } else {
             kvm_main_loop_wait(env, 1000);
         }