qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 12/10] tcg: protect TBContext with tb_lock.


From: Frederic Konrad
Subject: Re: [Qemu-devel] [PATCH 12/10] tcg: protect TBContext with tb_lock.
Date: Thu, 13 Aug 2015 15:04:04 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 13/08/2015 15:01, Paolo Bonzini wrote:
+    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. :)
Fortunately this revealed my yesterday bug with tb_alloc :).

Fred

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]