diff --git a/cpus.c b/cpus.c index a2e0642a46e6f1455e2e3b9f794390701f82b087..0debe772e5f46324acb5b2193c86cd170f3a77a8 100644 --- a/cpus.c +++ b/cpus.c @@ -100,9 +100,7 @@ static int cpu_can_run(CPUState *env) { if (env->stop) return 0; - if (env->stopped) - return 0; - if (!vm_running) + if (env->stopped || !vm_running) return 0; return 1; } @@ -111,7 +109,7 @@ static int cpu_has_work(CPUState *env) { if (env->stop) return 1; - if (env->stopped) + if (env->stopped || !vm_running) return 0; if (!env->halted) return 1;