diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2019-01-25 14:57:08 -0800 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2019-02-01 15:04:05 +0000 |
commit | 276c6e813719568bdc9743e87ff8f42115006206 (patch) | |
tree | e06400a28c7d1a843124d90cb724952758680426 /target/arm/cpu.c | |
parent | 42f6ed919325413392bea247a1e6f135deb469cd (diff) |
target/arm: Always enable pac keys for user-only
Drop the pac properties. This approach cannot work as written
because the properties are applied before arm_cpu_reset, which
zeros SCTLR_EL1 (amongst everything else).
We can re-introduce the properties if they turn out to be useful.
But since linux 5.0 enables all of the keys, they may not be.
Fixes: 1ae9cfbd470
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm/cpu.c')
-rw-r--r-- | target/arm/cpu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/target/arm/cpu.c b/target/arm/cpu.c index f00d450d0b..3874dc9875 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -185,6 +185,9 @@ static void arm_cpu_reset(CPUState *s) env->pstate = PSTATE_MODE_EL0t; /* Userspace expects access to DC ZVA, CTL_EL0 and the cache ops */ env->cp15.sctlr_el[1] |= SCTLR_UCT | SCTLR_UCI | SCTLR_DZE; + /* Enable all PAC keys. */ + env->cp15.sctlr_el[1] |= (SCTLR_EnIA | SCTLR_EnIB | + SCTLR_EnDA | SCTLR_EnDB); /* Enable all PAC instructions */ env->cp15.hcr_el2 |= HCR_API; env->cp15.scr_el3 |= SCR_API; |