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~
