> > +    tb_lock();
> >       tb = tb_gen_code(cpu, orig_tb->pc, orig_tb->cs_base, orig_tb->flags,
> >                        max_cycles | CF_NOCACHE);
> 
> tb_gen_code() calls tb_alloc() which calls tb_flush() we end in a double
> tb_lock here.
> But that's probably not really important here as we want to either do a
> tb_flush outside cpu_exec or realloc an other code buffer.

You're right!  Honestly I haven't tested tb_flush() at all with these
patches since it's documented as broken with multiple threads.

Luckily the bug is not in the first 10 patches. :)

Paolo

Reply via email to