[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH] target-arm: protect cpu_exclusive_*.
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [RFC PATCH] target-arm: protect cpu_exclusive_*. |
Date: |
Tue, 16 Dec 2014 10:49:16 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 |
On 16/12/2014 10:36, Frederic Konrad wrote:
> On 16/12/2014 10:31, Paolo Bonzini wrote:
>>
>> On 16/12/2014 10:13, address@hidden wrote:
>>> From: KONRAD Frederic <address@hidden>
>>>
>>> This adds a lock to avoid multiple exclusive access at the same time
>>> in case of
>>> TCG multithread.
>>>
>>> Signed-off-by: KONRAD Frederic <address@hidden>
>>> ---
>>> target-arm/cpu.c | 15 +++++++++++++++
>>> target-arm/cpu.h | 3 +++
>>> target-arm/helper.h | 3 +++
>>> target-arm/op_helper.c | 10 ++++++++++
>>> target-arm/translate.c | 6 ++++++
>>> 5 files changed, 37 insertions(+)
> [..]
>>> g_hash_table_destroy(cpu->cp_regs);
>>> + qemu_mutex_destroy(&cpu_exclusive_lock);
>> No need for this, and for -smp 2 it will cause the same lock to be
>> destroyed twice.
>>
>> Paolo
> Hi Paolo,
>
> Good point for SMP!
> The mutex doesn't need to be destroyed?
Not if it's just one for the whole process. Exiting QEMU will take care
of it.
Paolo
- [Qemu-devel] [RFC PATCH] target-arm: protect cpu_exclusive_*., fred . konrad, 2014/12/16
- Re: [Qemu-devel] [RFC PATCH] target-arm: protect cpu_exclusive_*., Peter Maydell, 2014/12/16
- Re: [Qemu-devel] [RFC PATCH] target-arm: protect cpu_exclusive_*., Frederic Konrad, 2014/12/17
- Re: [Qemu-devel] [RFC PATCH] target-arm: protect cpu_exclusive_*., Alexander Graf, 2014/12/17
- Re: [Qemu-devel] [RFC PATCH] target-arm: protect cpu_exclusive_*., Mark Burton, 2014/12/17
- Re: [Qemu-devel] [RFC PATCH] target-arm: protect cpu_exclusive_*., Alexander Graf, 2014/12/17
- Re: [Qemu-devel] [RFC PATCH] target-arm: protect cpu_exclusive_*., Mark Burton, 2014/12/17
- Re: [Qemu-devel] [RFC PATCH] target-arm: protect cpu_exclusive_*., Alexander Graf, 2014/12/17
- Re: [Qemu-devel] [RFC PATCH] target-arm: protect cpu_exclusive_*., Paolo Bonzini, 2014/12/17
- Re: [Qemu-devel] [RFC PATCH] target-arm: protect cpu_exclusive_*., Peter Maydell, 2014/12/17