diff options
Diffstat (limited to 'cpu-exec.c')
-rw-r--r-- | cpu-exec.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cpu-exec.c b/cpu-exec.c index 70c3e5ae1b..34eaedca04 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -208,8 +208,13 @@ int cpu_exec(CPUState *env1) uint8_t *tc_ptr; unsigned long next_tb; - if (cpu_halted(env1) == EXCP_HALTED) - return EXCP_HALTED; + if (env1->halted) { + if (!cpu_has_work(env1)) { + return EXCP_HALTED; + } + + env1->halted = 0; + } cpu_single_env = env1; |