Re: [Qemu-devel] [PATCH 03/10] replace spinlock by QemuMutex.

2015-08-28 Thread Paolo Bonzini
On 28/08/2015 16:53, Frederic Konrad wrote: >> After this commit it looks like we have no users of spinlock_t >> at all. It would be good to have a followup patch which deleted >> include/exec/spinlock.h. > > Seems Paolo forget to pick up the following patch from the mttcg tree: > "remove unused

Re: [Qemu-devel] [PATCH 03/10] replace spinlock by QemuMutex.

2015-08-28 Thread Frederic Konrad
On 28/08/2015 16:49, Peter Maydell wrote: On 12 August 2015 at 17:40, Paolo Bonzini wrote: From: KONRAD Frederic spinlock is only used in two cases: * cpu-exec.c: to protect TranslationBlock * mem_helper.c: for lock helper in target-i386 (which seems broken). It's a pthread_mutex_t in

Re: [Qemu-devel] [PATCH 03/10] replace spinlock by QemuMutex.

2015-08-28 Thread Peter Maydell
On 12 August 2015 at 17:40, Paolo Bonzini wrote: > From: KONRAD Frederic > > spinlock is only used in two cases: > * cpu-exec.c: to protect TranslationBlock > * mem_helper.c: for lock helper in target-i386 (which seems broken). > > It's a pthread_mutex_t in user-mode so better using QemuMutex

Re: [Qemu-devel] [PATCH 03/10] replace spinlock by QemuMutex.

2015-08-13 Thread Frederic Konrad
On 13/08/2015 15:12, Paolo Bonzini wrote: On 13/08/2015 14:17, Frederic Konrad wrote: diff --git a/linux-user/main.c b/linux-user/main.c index fdee981..fd06ce9 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -107,7 +107,7 @@ static int pending_cpus; /* Make sure everything is in a

Re: [Qemu-devel] [PATCH 03/10] replace spinlock by QemuMutex.

2015-08-13 Thread Paolo Bonzini
On 13/08/2015 14:17, Frederic Konrad wrote: >> diff --git a/linux-user/main.c b/linux-user/main.c >> index fdee981..fd06ce9 100644 >> --- a/linux-user/main.c >> +++ b/linux-user/main.c >> @@ -107,7 +107,7 @@ static int pending_cpus; >> /* Make sure everything is in a consistent state for callin

Re: [Qemu-devel] [PATCH 03/10] replace spinlock by QemuMutex.

2015-08-13 Thread Frederic Konrad
On 12/08/2015 18:40, Paolo Bonzini wrote: From: KONRAD Frederic spinlock is only used in two cases: * cpu-exec.c: to protect TranslationBlock * mem_helper.c: for lock helper in target-i386 (which seems broken). It's a pthread_mutex_t in user-mode so better using QemuMutex directly in thi

[Qemu-devel] [PATCH 03/10] replace spinlock by QemuMutex.

2015-08-12 Thread Paolo Bonzini
From: KONRAD Frederic spinlock is only used in two cases: * cpu-exec.c: to protect TranslationBlock * mem_helper.c: for lock helper in target-i386 (which seems broken). It's a pthread_mutex_t in user-mode so better using QemuMutex directly in this case. It allows as well to reuse tb_lock mut