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

linux-user/alpha: Set r20 secondary return value

This value is not, as far as I know, used by any linux software,
but it is set by the kernel and is part of the ABI.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20191106113318.10226-13-richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>

authored by

Richard Henderson and committed by
Laurent Vivier
5849dfe4 2ad983e0

+9
+9
linux-user/alpha/target_cpu.h
··· 27 27 } 28 28 env->ir[IR_V0] = 0; 29 29 env->ir[IR_A3] = 0; 30 + env->ir[IR_A4] = 1; /* OSF/1 secondary return: child */ 30 31 } 31 32 32 33 static inline void cpu_clone_regs_parent(CPUAlphaState *env, unsigned flags) 33 34 { 35 + /* 36 + * OSF/1 secondary return: parent 37 + * Note that the kernel does not do this if SETTLS, because the 38 + * settls argument register is still live after copy_thread. 39 + */ 40 + if (!(flags & CLONE_SETTLS)) { 41 + env->ir[IR_A4] = 0; 42 + } 34 43 } 35 44 36 45 static inline void cpu_set_tls(CPUAlphaState *env, target_ulong newtls)