On 05/07/2016 00:31, Emilio G. Cota wrote:
> My mistake. An atomic_read here isn't needed: as the commit message
> points out, we only need atomic_read when tb_lock isn't held. In this
> case tb_lock is held, so we only use atomic accesses for writing
> to the array.
It's harmless though. In C1
On Sat, Jul 02, 2016 at 08:09:35 +0100, Alex Bennée wrote:
>
> Emilio G. Cota writes:
>
> > On Fri, Jul 01, 2016 at 17:16:09 +0100, Alex Bennée wrote:
> >> From: Sergey Fedorov
> > (snip)
> >> @@ -333,7 +338,7 @@ static inline TranslationBlock *tb_find_fast(CPUState
> >> *cpu,
> >> is
On Fri, Jul 01, 2016 at 17:32:01 -0700, Richard Henderson wrote:
> On 07/01/2016 05:17 PM, Emilio G. Cota wrote:
> >On Fri, Jul 01, 2016 at 17:16:09 +0100, Alex Bennée wrote:
> >>From: Sergey Fedorov
> >(snip)
> >>@@ -333,7 +338,7 @@ static inline TranslationBlock *tb_find_fast(CPUState
> >>*cpu,
Emilio G. Cota writes:
> On Fri, Jul 01, 2016 at 17:16:09 +0100, Alex Bennée wrote:
>> From: Sergey Fedorov
> (snip)
>> @@ -333,7 +338,7 @@ static inline TranslationBlock *tb_find_fast(CPUState
>> *cpu,
>> is executed. */
>> cpu_get_tb_cpu_state(env, &pc, &cs_base, &flags);
>>
On 07/01/2016 05:17 PM, Emilio G. Cota wrote:
On Fri, Jul 01, 2016 at 17:16:09 +0100, Alex Bennée wrote:
From: Sergey Fedorov
(snip)
@@ -333,7 +338,7 @@ static inline TranslationBlock *tb_find_fast(CPUState *cpu,
is executed. */
cpu_get_tb_cpu_state(env, &pc, &cs_base, &flags);
On Fri, Jul 01, 2016 at 17:16:09 +0100, Alex Bennée wrote:
> From: Sergey Fedorov
(snip)
> @@ -333,7 +338,7 @@ static inline TranslationBlock *tb_find_fast(CPUState
> *cpu,
> is executed. */
> cpu_get_tb_cpu_state(env, &pc, &cs_base, &flags);
> tb_lock();
> -tb = cpu->tb_jmp
On 07/01/2016 09:16 AM, Alex Bennée wrote:
From: Sergey Fedorov
First, ensure atomicity of CPU's 'tb_jmp_cache' access by:
* using atomic_read() to look up a TB when not holding 'tb_lock';
* using atomic_write() to remove a TB from each CPU's local cache on
TB invalidation.
Second, add so
From: Sergey Fedorov
First, ensure atomicity of CPU's 'tb_jmp_cache' access by:
* using atomic_read() to look up a TB when not holding 'tb_lock';
* using atomic_write() to remove a TB from each CPU's local cache on
TB invalidation.
Second, add some memory barriers to ensure we don't put the