The current mechanism discards the flags which were set in atomic execution. Properly save them.
CC: Alex Bennée <alex.ben...@linaro.org> CC: Richard Henderson <r...@twiddle.net> CC: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Pranith Kumar <bobby.pr...@gmail.com> --- cpu-exec.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cpu-exec.c b/cpu-exec.c index b0ddada8c1..9200c643c2 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -228,6 +228,7 @@ static void cpu_exec_nocache(CPUState *cpu, int max_cycles, static void cpu_exec_step(CPUState *cpu) { + CPUClass *cc = CPU_GET_CLASS(cpu); CPUArchState *env = (CPUArchState *)cpu->env_ptr; TranslationBlock *tb; target_ulong cs_base, pc; @@ -239,9 +240,13 @@ static void cpu_exec_step(CPUState *cpu) 1 | CF_NOCACHE | CF_IGNORE_ICOUNT); tb->orig_tb = NULL; tb_unlock(); + + cc->cpu_exec_enter(cpu); /* execute the generated code */ trace_exec_tb_nocache(tb, pc); cpu_tb_exec(cpu, tb); + + cc->cpu_exec_exit(cpu); tb_lock(); tb_phys_invalidate(tb, -1); tb_free(tb); -- 2.11.0