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:
Richard Henderson 2019-02-03 17:51:55 -05:00 committed by Lioncash
parent 93acc4dc56
commit 932c4e8569
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -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;