On 21/01/21 17:44, Peter Maydell wrote:
On Thu, 21 Jan 2021 at 16:10, Daniel P. Berrangé <berra...@redhat.com> wrote:
FWIW The libucontext impl is all ASM based and has coverage for all the
arches we care about:
https://github.com/kaniini/libucontext
so doesn't seem like there's a need for coroutine-asm if we can rely
on libucontext for portability where neede.
The README for that notes a couple of pretty major omissions:
* it doesn't handle floating point registers
* it doesn't do anything about the signal mask
I'm pretty sure that not handling the fp regs could cause breakage
for Arm at least (depending on what the compiler chooses to do
in the functions that work with the ucontext functions). The
signal mask stuff might be OK for us because of the carefully
limited use we make of the ucontext functions, but it would be
a bit of a pain to have to analyse that code for both sets of semantics.
The lack of signal mask handling is an improvement for us. :) We want
the signal mask to be per thread, not per coroutine.
Floating point however is an issue if they don't save-restore v8-v15
(for aarch64, I don't remember what the AAPCS32 says).
Paolo