qemu-devel
[Top][All Lists]
Advanced

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

Re: [PULL 0/2] Libslirp patches


From: Paolo Bonzini
Subject: Re: [PULL 0/2] Libslirp patches
Date: Mon, 5 Jul 2021 18:43:56 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 05/07/21 18:31, Peter Maydell wrote:
8 here means "8 bytes", not "8 bits". And indeed on i386 you can't
do 8-byte atomics with simple insns.

You can, there's a cmpxchg8b instruction. The problem is that somehow configure's view of this disagrees with what happens during compilation.

If anybody can send a config.log and make V=1 log, I can look at it.

Paolo

The compiler's answer to this
is "emit a call to a helper in libatomic, which will emulate an
atomic access by taking some kind of lock". We don't ever want to
fall back to "take a lock" because sometimes our accesses to the
atomic variables are from TCG generated code -- this is why we
don't link against libatomic. The problem is that we have not
correctly detected that this compiler can't do inline atomics
for 64-bit values and avoided using them. But at least we have
made this a compile failure rather than a silently-wrong-code bug:-)




reply via email to

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