qemu-devel
[Top][All Lists]
Advanced

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

Re: Question about atomics


From: Warner Losh
Subject: Re: Question about atomics
Date: Sun, 13 Mar 2022 22:09:05 -0600



On Sun, Mar 13, 2022 at 2:19 PM Richard Henderson <richard.henderson@linaro.org> wrote:
On 3/13/22 11:29, Warner Losh wrote:
> So I was assuming that the cas instructions for arm use start/end_exclsive under the covers.
> Is that the case?

Nope.  The store exclusive guest insn is implemented with a host cmpxchg.

Oh? Out of paranoia, how can I verify that this is the case when compiled on FreeBSD?
Perhaps the atomic sequence FreeBSD uses differs a little from Linux and we don't trigger
that code? Or there's some adjustment that I've not made yet... the code seems to work
on 3.1 but not on latest, and there's been a lot of changes to tcg, so I'd like to rule it
out since there's a lot of other change too and there's too many variables...
 
Oh, I'd forgotten about the old arm cmpxchg64 syscall, which is still implemented with
start/end_exclusive.  That should get fixed...

FreeBSD doesn't have this helper. So bsd-user doesn't implement it... The only
good thing about that is that there's nothing for me to fix :/...

Warner
 

r~

reply via email to

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