diff options
Diffstat (limited to 'cpu-exec.c')
-rw-r--r-- | cpu-exec.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cpu-exec.c b/cpu-exec.c index dc81e79435..c776605e05 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -213,6 +213,8 @@ static void cpu_handle_debug_exception(CPUState *env) /* main execution loop */ +volatile sig_atomic_t exit_request; + int cpu_exec(CPUState *env1) { volatile host_reg_t saved_env_reg; @@ -234,6 +236,11 @@ int cpu_exec(CPUState *env1) asm(""); env = env1; + if (exit_request) { + env->exit_request = 1; + exit_request = 0; + } + #if defined(TARGET_I386) if (!kvm_enabled()) { /* put eflags in CPU temporary format */ |