So that it applies to usermode as well.
Signed-off-by: Emilio G. Cota <[email protected]>
---
cpu-exec.c | 2 ++
cpus.c | 1 -
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/cpu-exec.c b/cpu-exec.c
index b8a11e1..2b9a447 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -386,6 +386,8 @@ int cpu_exec(CPUState *cpu)
uintptr_t next_tb;
SyncClocks sc;
+ current_cpu = cpu;
+
#ifndef CONFIG_USER_ONLY
/* FIXME: user-mode emulation probably needs a similar mechanism as well,
* for example for tb_flush.
diff --git a/cpus.c b/cpus.c
index 5484ce6..0fe6576 100644
--- a/cpus.c
+++ b/cpus.c
@@ -1079,7 +1079,6 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
cpu->thread_id = qemu_get_thread_id();
cpu->created = true;
cpu->can_do_io = 1;
- current_cpu = cpu;
qemu_cond_signal(&qemu_cpu_cond);
--
1.9.1