[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 00/27] cmpxchg-based emulation of atomics
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v2 00/27] cmpxchg-based emulation of atomics |
Date: |
Fri, 1 Jul 2016 10:23:38 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 |
On 07/01/2016 10:04 AM, Richard Henderson wrote:
> I spent a couple evenings this week tweaking Emilio's patch set.
>
> The first major change is to "qemu/int128.h", so that we can use
> that type in the context of a 16-byte cmpxchg. I have yet to teach
> TCG code generation about this type, so it's really only usable
> from other helper functions. But that's still an improvement over
> having to return two uint64_t by reference.
>
> The second major change is to funnel atomic operation generation
> through functions in tcg-op.c. There we can test whether or not
> we're generating code in a parallel context and require atomic
> operations. This also centralizes the helper functions so that we
> don't have to have the same sets in every target.
>
> The third major change is providing a mechanism by which we can
> trap on atomic operations that we do not support, exit the cpu loop,
> stop the world, and then re-execute the instruction in a serial context.
> This is obviously something that will need to be filled in further
> as MTTCG progresses.
>
> This minimally tested, but it is good enough to boot Fedora 24 x86-64,
> even with the softmmu single-step stubbed out. Perhaps unsurprisingly,
> Fedora does not attempt an unaligned atomic operation.
I should have mentioned -- this was based on my tcg-next branch, for which I
just sent a pull request (in particular, Sergey's alignment improvement patch).
I pushed my patchset to
git://github.com/rth7680/qemu.git atomic-2
for ease of browsing.
r~
- [Qemu-devel] [PATCH v2 21/27] target-arm: Rearrange aa32 load and store functions, (continued)
- [Qemu-devel] [PATCH v2 21/27] target-arm: Rearrange aa32 load and store functions, Richard Henderson, 2016/07/01
- [Qemu-devel] [PATCH v2 17/27] target-i386: emulate LOCK'ed BTX ops using atomic helpers, Richard Henderson, 2016/07/01
- [Qemu-devel] [PATCH v2 23/27] target-arm: emulate SWP with atomic_xchg helper, Richard Henderson, 2016/07/01
- [Qemu-devel] [PATCH v2 26/27] linux-user: remove handling of aarch64's EXCP_STREX, Richard Henderson, 2016/07/01
- [Qemu-devel] [PATCH v2 25/27] linux-user: remove handling of ARM's EXCP_STREX, Richard Henderson, 2016/07/01
- [Qemu-devel] [PATCH v2 22/27] target-arm: emulate LL/SC using cmpxchg helpers, Richard Henderson, 2016/07/01
- [Qemu-devel] [PATCH v2 27/27] target-arm: remove EXCP_STREX + cpu_exclusive_{test, info}, Richard Henderson, 2016/07/01
- [Qemu-devel] [PATCH v2 20/27] tests: add atomic_add-bench, Richard Henderson, 2016/07/01
- [Qemu-devel] [PATCH v2 24/27] target-arm: emulate aarch64's LL/SC using cmpxchg helpers, Richard Henderson, 2016/07/01
- Re: [Qemu-devel] [PATCH v2 00/27] cmpxchg-based emulation of atomics,
Richard Henderson <=
- Re: [Qemu-devel] [PATCH v2 00/27] cmpxchg-based emulation of atomics, Emilio G. Cota, 2016/07/07