qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

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