mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-24 12:28:14 +00:00
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. Backports commit 276c6e813719568bdc9743e87ff8f42115006206 from qemu
This commit is contained in:
parent
93acc4dc56
commit
932c4e8569
1 changed files with 3 additions and 0 deletions
|
@ -177,6 +177,9 @@ static void arm_cpu_reset(CPUState *s)
|
||||||
env->pstate = PSTATE_MODE_EL0t;
|
env->pstate = PSTATE_MODE_EL0t;
|
||||||
/* Userspace expects access to DC ZVA, CTL_EL0 and the cache ops */
|
/* Userspace expects access to DC ZVA, CTL_EL0 and the cache ops */
|
||||||
env->cp15.sctlr_el[1] |= SCTLR_UCT | SCTLR_UCI | SCTLR_DZE;
|
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 */
|
/* Enable all PAC instructions */
|
||||||
env->cp15.hcr_el2 |= HCR_API;
|
env->cp15.hcr_el2 |= HCR_API;
|
||||||
env->cp15.scr_el3 |= SCR_API;
|
env->cp15.scr_el3 |= SCR_API;
|
||||||
|
|
Loading…
Reference in a new issue