[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] exec: do not use qemu/tls.h
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] exec: do not use qemu/tls.h |
Date: |
Mon, 01 Jul 2013 12:15:49 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 |
Il 01/07/2013 11:51, Peter Maydell ha scritto:
> On 1 July 2013 10:35, Stefan Hajnoczi <address@hidden> wrote:
>> From: Paolo Bonzini <address@hidden>
>>
>> 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 <address@hidden>
>> ---
>> 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
[Qemu-devel] [PATCH 1/2] exec: do not use qemu/tls.h, Stefan Hajnoczi, 2013/07/01