[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Peter Maydell
Subject: Re: [Qemu-devel] [RFC 01/10] exec: Introduce tcg_exclusive_{lock, unlock}()
Date: Wed, 8 Jun 2016 12:32:05 +0100

On 8 June 2016 at 11:00, alvise rigo <address@hidden> 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 accesses exclusive with respect to
> every memory access, this is allowed by the softmmu. The access is now
> something like:
> lock() -> softmmu_access() -> unlock()
> where "softmmu_access()" is not just a memory access, but includes a
> manipulation of the EXCL bitmap and possible queries of TLB flushes.
> So there are similarities, but are pretty much confined to the
> locking/unlocking of a spinlock/mutex.
> This made me think, how does linux-user can properly work with
> upstream TCG, for instance, in an absurd configuration like target-arm
> on ARM host?

linux-user's exclusives handling is "broken but happens to sort of
work most of the time". Fixing this and bringing it into line with
how we want to handle exclusives in the multithreaded system emulation
case is one of the things I was hoping would come out of the MTTCG

-- PMM

reply via email to

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