On Mon, May 13, 2019 at 04:40:52PM +0100, Peter Maydell wrote: > On Mon, 13 May 2019 at 16:31, Dave Martin <dave.mar...@arm.com> wrote: > > > > On Mon, May 13, 2019 at 02:55:01PM +0100, Andrew Jones wrote: > > > QEMU keeps its 128-bit and larger words in the same order (least > > > significant word first) for both host endian types. We need to > > > do word swapping every time we set/get them to/from KVM. > > > > I'm not sure whether this is appropriate here, though it depends on > > what QEMU does with the data. > > The layout is optimised for TCG emulation to be able > to work with it, I think (rth would have the definite > reason, though).
So long as we are agreed about the ABI, this is none of my concern :) > > Something non-obvious to be aware of: > > > > As exposed through the signal frame and the KVM ABI, the memory > > representation of an SVE reg is invariant with respect to the > > endianness. > > Yes; we handle this conversion as we write out the signal frame: > https://github.com/qemu/qemu/blob/master/linux-user/aarch64/signal.c#L184 Right. I hadn't focused consciously on this, since the architecture does the work for us in the kernel (mostly). I will check the documentation to make sure the behaviour is clearly described, anyhow. Cheers ---Dave