Re: [Qemu-devel] [RFC 01/10] exec: Introduce tcg_exclusive_{lock, unlock}()

2016-06-08 Thread Alex Bennée
alvise rigo writes: > As far as I understand, linux-user uses a mutex to make the atomic > accesses exclusive with respect to other CPU's atomic accesses. So > basically in the LDREX case it implements: > lock() -> access() -> unlock() > This patch series makes the atomic accesses exclusive with

Re: [Qemu-devel] [RFC 01/10] exec: Introduce tcg_exclusive_{lock, unlock}()

2016-06-08 Thread Peter Maydell
On 8 June 2016 at 11:00, alvise rigo wrote: > As far as I understand, linux-user uses a mutex to make the atomic > accesses exclusive with respect to other CPU's atomic accesses. So > basically in the LDREX case it implements: > lock() -> access() -> unlock() > This patch series makes the atomic a

Re: [Qemu-devel] [RFC 01/10] exec: Introduce tcg_exclusive_{lock, unlock}()

2016-06-08 Thread Alex Bennée
Alvise Rigo writes: > Add tcg_exclusive_{lock,unlock}() functions that will be used for making > the emulation of LL and SC instructions thread safe. I wonder how much similarity there is to the mechanism linus-user ends up using for it's exclusive-start/end? > > Signed-off-by: Alvise Rigo >

Re: [Qemu-devel] [RFC 01/10] exec: Introduce tcg_exclusive_{lock, unlock}()

2016-06-08 Thread alvise rigo
As far as I understand, linux-user uses a mutex to make the atomic accesses exclusive with respect to other CPU's atomic accesses. So basically in the LDREX case it implements: lock() -> access() -> unlock() This patch series makes the atomic accesses exclusive with respect to every memory access,

Re: [Qemu-devel] [RFC 01/10] exec: Introduce tcg_exclusive_{lock, unlock}()

2016-06-02 Thread alvise rigo
Hi Pranith, Thank you for the hint, I will keep this in mind for the next version. Regards, alvise On Tue, May 31, 2016 at 5:03 PM, Pranith Kumar wrote: > Hi Alvise, > > On Thu, May 26, 2016 at 12:35 PM, Alvise Rigo > wrote: >> Add tcg_exclusive_{lock,unlock}() functions that will be used for

Re: [Qemu-devel] [RFC 01/10] exec: Introduce tcg_exclusive_{lock, unlock}()

2016-05-31 Thread Pranith Kumar
Hi Alvise, On Thu, May 26, 2016 at 12:35 PM, Alvise Rigo wrote: > Add tcg_exclusive_{lock,unlock}() functions that will be used for making > the emulation of LL and SC instructions thread safe. > > Signed-off-by: Alvise Rigo > +__thread bool cpu_have_exclusive_lock; > +QemuSpin cpu_exclusive_

[Qemu-devel] [RFC 01/10] exec: Introduce tcg_exclusive_{lock, unlock}()

2016-05-26 Thread Alvise Rigo
Add tcg_exclusive_{lock,unlock}() functions that will be used for making the emulation of LL and SC instructions thread safe. Signed-off-by: Alvise Rigo --- cpus.c| 2 ++ exec.c| 18 ++ include/qom/cpu.h | 5 + 3 files changed, 25 insertions(+) diff