@@ -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);
The current mechanism discards the flags which were set in atomic execution. Properly save them. CC: Alex Bennée <alex.bennee@linaro.org> CC: Richard Henderson <rth@twiddle.net> CC: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com> --- cpu-exec.c | 5 +++++ 1 file changed, 5 insertions(+)