[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 03/38] cpu-exec: set current_cpu at cpu_exec()
From: |
Emilio G. Cota |
Subject: |
[Qemu-devel] [RFC 03/38] cpu-exec: set current_cpu at cpu_exec() |
Date: |
Sun, 23 Aug 2015 20:23:32 -0400 |
So that it applies to usermode as well.
Signed-off-by: Emilio G. Cota <address@hidden>
---
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
[Qemu-devel] [RFC 04/38] translate-all: remove volatile from have_tb_lock, Emilio G. Cota, 2015/08/23
[Qemu-devel] [RFC 06/38] seqlock: add missing 'inline' to seqlock_read_retry, Emilio G. Cota, 2015/08/23
[Qemu-devel] [RFC 02/38] hw/i386/kvmvapic: add missing include of tcg.h, Emilio G. Cota, 2015/08/23