On 26/06/2015 16:47, fred.kon...@greensocs.com wrote: > @@ -273,8 +274,9 @@ static TranslationBlock *tb_find_slow(CPUArchState *env, > ptb1 = &tcg_ctx.tb_ctx.tb_phys_hash[h]; > for(;;) { > tb = *ptb1; > - if (!tb) > - goto not_found; > + if (!tb) { > + return tb; > + }
You are dereferencing tb outside the lock. You need a smp_read_barrier_depends() here, and a smp_wmb() at the beginning of tb_link_page. Paolo > if (tb->pc == pc &&