From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTfZ2-0006uO-PP for qemu-devel@nongnu.org; Sun, 23 Aug 2015 20:24:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZTfYz-0000ez-Ol for qemu-devel@nongnu.org; Sun, 23 Aug 2015 20:24:40 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:41484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTfYz-0000dE-LT for qemu-devel@nongnu.org; Sun, 23 Aug 2015 20:24:37 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 68F4220834 for ; Sun, 23 Aug 2015 20:24:36 -0400 (EDT) From: "Emilio G. Cota" Date: Sun, 23 Aug 2015 20:23:32 -0400 Message-Id: <1440375847-17603-4-git-send-email-cota@braap.org> In-Reply-To: <1440375847-17603-1-git-send-email-cota@braap.org> References: <1440375847-17603-1-git-send-email-cota@braap.org> Subject: [Qemu-devel] [RFC 03/38] cpu-exec: set current_cpu at cpu_exec() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, mttcg@listserver.greensocs.com Cc: mark.burton@greensocs.com, a.rigo@virtualopensystems.com, guillaume.delbergue@greensocs.com, pbonzini@redhat.com, alex.bennee@linaro.org, Frederic Konrad So that it applies to usermode as well. Signed-off-by: Emilio G. Cota --- 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