ddc3e74d9c
linux-user: Pass CPUArchState to target_restore_altstack
...
In most cases we were already passing get_sp_from_cpustate
directly to the function. In other cases, we were passing
a local variable which already contained the same value.
In the rest of the cases, we were passing the stack pointer
out of env directly.
Reviewed by: Warner Losh <imp@bsdimp.com >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20210426025334.1168495-5-richard.henderson@linaro.org >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2021-05-15 21:43:23 +02:00
56384cf3ad
linux-user: Use target_restore_altstack in all sigreturn
...
Note that target_restore_altstack uses the host memory
pointer that we have already verified, so TARGET_EFAULT
is not a possible return value.
Note that using -EFAULT was a bug.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20210426025334.1168495-3-richard.henderson@linaro.org >
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
2021-05-15 21:43:23 +02:00
c7169b022b
linux-user: Use cpu_untagged_addr in access_ok; split out *_untagged
...
Provide both tagged and untagged versions of access_ok.
In a few places use thread_cpu, as the user is several
callees removed from do_syscall1.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20210212184902.1251044-17-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2021-02-16 11:04:53 +00:00
6aa9e42f27
target/i386: Use env_cpu, env_archcpu
...
Cleanup in the boilerplate that each target must define.
Replace x86_env_get_cpu with env_archcpu. The combination
CPU(x86_env_get_cpu) should have used ENV_GET_CPU to begin;
use env_cpu now.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2019-06-10 07:03:42 -07:00
9850f9f63a
linux-user: move get_sp_from_cpustate() to target_cpu.h
...
Remove useless includes
Fix HPPA include guard.
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
Acked-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20180529194207.31503-9-laurent@vivier.eu >
2018-06-04 01:30:44 +02:00
465e237bf7
linux-user: introduce target_sigsp() and target_save_altstack()
...
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20180411192347.30228-1-laurent@vivier.eu >
2018-05-03 18:29:15 +02:00
a075f313c5
linux-user: move i386/x86_64 signal.c parts to i386 directory
...
No code change, only move code from signal.c to
i386/signal.c, except adding includes and
exporting setup_frame() and setup_rt_frame().
x86_64/signal.c includes i386/signal.c
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20180424192635.6027-17-laurent@vivier.eu >
2018-04-30 09:47:47 +02:00
befb7447a0
linux-user: create a dummy per arch signal.c
...
Create a signal-common.h for future use by these new files
and use it in the existing signal.c
Signed-off-by: Laurent Vivier <laurent@vivier.eu >
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20180424192635.6027-2-laurent@vivier.eu >
2018-04-30 09:47:47 +02:00