[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 1/2] tcg: Save cpu flags in atomic execution
From: |
Pranith Kumar |
Subject: |
[Qemu-devel] [PATCH v2 1/2] tcg: Save cpu flags in atomic execution |
Date: |
Fri, 10 Feb 2017 13:45:24 -0500 |
The current mechanism discards the flags which were set in atomic
execution. Properly save them.
CC: Alex Bennée <address@hidden>
CC: Richard Henderson <address@hidden>
CC: Paolo Bonzini <address@hidden>
Signed-off-by: Pranith Kumar <address@hidden>
---
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