qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

linux-user: Use correct alignment for long long on i386 guests

For i386, the ABI specifies that 'long long' (8 byte values)
need only be 4 aligned, but we were requiring them to be
8-aligned. This meant we were laying out the target_epoll_event
structure wrongly. Add a suitable ifdef to abitypes.h to
specify the i386-specific alignment requirement.

Reported-by: Icenowy Zheng <icenowy@aosc.xyz>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>

authored by

Peter Maydell and committed by
Riku Voipio
d9fe91d8 09704e6d

+4
+4
include/exec/user/abitypes.h
··· 15 15 #define ABI_LLONG_ALIGNMENT 2 16 16 #endif 17 17 18 + #if defined(TARGET_I386) && !defined(TARGET_X86_64) 19 + #define ABI_LLONG_ALIGNMENT 4 20 + #endif 21 + 18 22 #ifndef ABI_SHORT_ALIGNMENT 19 23 #define ABI_SHORT_ALIGNMENT 2 20 24 #endif