[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH V7 07/19] protect TBContext with tb_lock.
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [RFC PATCH V7 07/19] protect TBContext with tb_lock. |
Date: |
Mon, 10 Aug 2015 18:50:50 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
On 10/08/2015 18:36, Paolo Bonzini wrote:
>> > diff --git a/target-arm/translate.c b/target-arm/translate.c
>> > index 69ac18c..960c75e 100644
>> > --- a/target-arm/translate.c
>> > +++ b/target-arm/translate.c
>> > @@ -11166,6 +11166,8 @@ static inline void
>> > gen_intermediate_code_internal(ARMCPU *cpu,
>> >
>> > dc->tb = tb;
>> >
>> > + tb_lock();
> This locks twice, I think? Both cpu_restore_state_from_tb and
> tb_gen_code (which calls cpu_gen_code) take the lock. How does it work?
>
... ah, the lock is recursive!
I think this can be avoided. Let's look at it next week.
Paolo
- Re: [Qemu-devel] [RFC PATCH V7 02/19] cpus: add tcg_exec_flag., (continued)
[Qemu-devel] [RFC PATCH V7 03/19] cpus: introduce async_run_safe_work_on_cpu., fred . konrad, 2015/08/10
[Qemu-devel] [RFC PATCH V7 05/19] remove unused spinlock., fred . konrad, 2015/08/10
[Qemu-devel] [RFC PATCH V7 06/19] add support for spin lock on POSIX systems exclusively, fred . konrad, 2015/08/10
[Qemu-devel] [RFC PATCH V7 04/19] replace spinlock by QemuMutex., fred . konrad, 2015/08/10
[Qemu-devel] [RFC PATCH V7 07/19] protect TBContext with tb_lock., fred . konrad, 2015/08/10
Re: [Qemu-devel] [RFC PATCH V7 07/19] protect TBContext with tb_lock., Frederic Konrad, 2015/08/11
Re: [Qemu-devel] [RFC PATCH V7 07/19] protect TBContext with tb_lock., Paolo Bonzini, 2015/08/11
Re: [Qemu-devel] [RFC PATCH V7 07/19] protect TBContext with tb_lock., Peter Maydell, 2015/08/11
Re: [Qemu-devel] [RFC PATCH V7 07/19] protect TBContext with tb_lock., Paolo Bonzini, 2015/08/11
Re: [Qemu-devel] [RFC PATCH V7 07/19] protect TBContext with tb_lock., Frederic Konrad, 2015/08/12