[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH V6 05/18] protect TBContext with tb_lock.
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [RFC PATCH V6 05/18] protect TBContext with tb_lock. |
Date: |
Fri, 26 Jun 2015 18:20:04 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 |
On 26/06/2015 16:47, address@hidden 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 &&
- Re: [Qemu-devel] [RFC PATCH V6 03/18] remove unused spinlock., (continued)
[Qemu-devel] [RFC PATCH V6 06/18] tcg: remove tcg_halt_cond global variable., fred . konrad, 2015/06/26
[Qemu-devel] [RFC PATCH V6 05/18] protect TBContext with tb_lock., fred . konrad, 2015/06/26
Re: [Qemu-devel] [RFC PATCH V6 05/18] protect TBContext with tb_lock.,
Paolo Bonzini <=
[Qemu-devel] [RFC PATCH V6 08/18] cpu: remove exit_request global., fred . konrad, 2015/06/26
[Qemu-devel] [RFC PATCH V6 09/18] cpu: add a tcg_executing flag., fred . konrad, 2015/06/26
[Qemu-devel] [RFC PATCH V6 10/18] tcg: switch on multithread., fred . konrad, 2015/06/26
[Qemu-devel] [RFC PATCH V6 11/18] cpus: make qemu_cpu_kick_thread public., fred . konrad, 2015/06/26
[Qemu-devel] [RFC PATCH V6 07/18] Drop global lock during TCG code execution, fred . konrad, 2015/06/26