[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 33/45] linux-user/aarch64: Clear tpidr2_el0 if CLONE_SETTLS
From: |
Peter Maydell |
Subject: |
[PULL 33/45] linux-user/aarch64: Clear tpidr2_el0 if CLONE_SETTLS |
Date: |
Mon, 11 Jul 2022 14:57:38 +0100 |
From: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220708151540.18136-34-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
linux-user/aarch64/target_cpu.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/linux-user/aarch64/target_cpu.h b/linux-user/aarch64/target_cpu.h
index 97a477bd3e9..f90359faf20 100644
--- a/linux-user/aarch64/target_cpu.h
+++ b/linux-user/aarch64/target_cpu.h
@@ -34,10 +34,13 @@ static inline void cpu_clone_regs_parent(CPUARMState *env,
unsigned flags)
static inline void cpu_set_tls(CPUARMState *env, target_ulong newtls)
{
- /* Note that AArch64 Linux keeps the TLS pointer in TPIDR; this is
+ /*
+ * Note that AArch64 Linux keeps the TLS pointer in TPIDR; this is
* different from AArch32 Linux, which uses TPIDRRO.
*/
env->cp15.tpidr_el[0] = newtls;
+ /* TPIDR2_EL0 is cleared with CLONE_SETTLS. */
+ env->cp15.tpidr2_el0 = 0;
}
static inline abi_ulong get_sp_from_cpustate(CPUARMState *state)
--
2.25.1
- [PULL 02/45] target/arm: Add infrastructure for disas_sme, (continued)
- [PULL 02/45] target/arm: Add infrastructure for disas_sme, Peter Maydell, 2022/07/11
- [PULL 09/45] target/arm: Mark SMMLA, UMMLA, USMMLA as non-streaming, Peter Maydell, 2022/07/11
- [PULL 06/45] target/arm: Mark BDEP, BEXT, BGRP, COMPACT, FEXPA, FTSSEL as non-streaming, Peter Maydell, 2022/07/11
- [PULL 16/45] target/arm: Handle SME in sve_access_check, Peter Maydell, 2022/07/11
- [PULL 19/45] target/arm: Implement SME MOVA, Peter Maydell, 2022/07/11
- [PULL 21/45] target/arm: Export unpredicated ld/st from translate-sve.c, Peter Maydell, 2022/07/11
- [PULL 24/45] target/arm: Implement FMOPA, FMOPS (non-widening), Peter Maydell, 2022/07/11
- [PULL 17/45] target/arm: Implement SME RDSVL, ADDSVL, ADDSPL, Peter Maydell, 2022/07/11
- [PULL 26/45] target/arm: Implement FMOPA, FMOPS (widening), Peter Maydell, 2022/07/11
- [PULL 31/45] target/arm: Reset streaming sve state on exception boundaries, Peter Maydell, 2022/07/11
- [PULL 33/45] linux-user/aarch64: Clear tpidr2_el0 if CLONE_SETTLS,
Peter Maydell <=
- [PULL 37/45] linux-user/aarch64: Do not allow duplicate or short sve records, Peter Maydell, 2022/07/11
- [PULL 34/45] linux-user/aarch64: Reset PSTATE.SM on syscalls, Peter Maydell, 2022/07/11
- [PULL 30/45] target/arm: Implement SCLAMP, UCLAMP, Peter Maydell, 2022/07/11
- [PULL 36/45] linux-user/aarch64: Tidy target_restore_sigframe error return, Peter Maydell, 2022/07/11
- [PULL 39/45] linux-user/aarch64: Move sve record checks into restore, Peter Maydell, 2022/07/11
- [PULL 35/45] linux-user/aarch64: Add SM bit to SVE signal context, Peter Maydell, 2022/07/11
- [PULL 44/45] target/arm: Enable SME for user-only, Peter Maydell, 2022/07/11
- [PULL 28/45] target/arm: Implement PSEL, Peter Maydell, 2022/07/11
- [PULL 20/45] target/arm: Implement SME LD1, ST1, Peter Maydell, 2022/07/11