From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Utb9I-00056r-2g for qemu-devel@nongnu.org; Mon, 01 Jul 2013 06:15:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Utb9G-00083Z-SZ for qemu-devel@nongnu.org; Mon, 01 Jul 2013 06:15:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24336) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Utb9G-00083P-G8 for qemu-devel@nongnu.org; Mon, 01 Jul 2013 06:15:54 -0400 Message-ID: <51D156D5.8050002@redhat.com> Date: Mon, 01 Jul 2013 12:15:49 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1372671341-19855-1-git-send-email-stefanha@redhat.com> <1372671341-19855-2-git-send-email-stefanha@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/2] exec: do not use qemu/tls.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Anthony Liguori , Ed Maste , qemu-devel@nongnu.org, Stefan Hajnoczi Il 01/07/2013 11:51, Peter Maydell ha scritto: > On 1 July 2013 10:35, Stefan Hajnoczi wrote: >> From: Paolo Bonzini >> >> The next patch will change qemu/tls.h to support more platforms, but at >> some performance cost. Declare cpu_single_env directly instead of using >> the tls.h abstractions. >> >> Signed-off-by: Paolo Bonzini >> --- >> exec.c | 10 ++++++++-- >> include/exec/cpu-all.h | 14 +++++++++++--- >> include/qemu/tls.h | 52 -------------------------------------------------- >> 3 files changed, 19 insertions(+), 57 deletions(-) >> delete mode 100644 include/qemu/tls.h >> >> diff --git a/exec.c b/exec.c >> index c49806c..02263db 100644 >> --- a/exec.c >> +++ b/exec.c >> @@ -70,9 +70,15 @@ static MemoryRegion io_mem_unassigned; >> #endif >> >> CPUArchState *first_cpu; >> + >> /* current CPU in the current thread. It is only valid inside >> - cpu_exec() */ >> -DEFINE_TLS(CPUArchState *,cpu_single_env); >> + * cpu_exec(). See comment in include/exec/cpu-all.h. */ >> +#if defined CONFIG_KVM || (defined CONFIG_USER_ONLY && defined CONFIG_USE_NPTL) >> +__thread CPUArchState *cpu_single_env; >> +#else >> +CPUArchState *cpu_single_env; >> +#endif > > This is still wrong, as per my review comments on the previous > version. I'm replying there. Paolo