[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 26/27] target/arm: Enable PAuth for user-only, pa
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH v2 26/27] target/arm: Enable PAuth for user-only, part 2 |
Date: |
Thu, 13 Dec 2018 23:24:09 -0600 |
FIXME: We should have an attribute that controls the EL1 enable bits.
We may not always want to turn on pointer authentication with -cpu max.
Signed-off-by: Richard Henderson <address@hidden>
---
target/arm/cpu.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 0b185f8d30..bc2c9eb551 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -162,6 +162,12 @@ 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;
+ env->cp15.sctlr_el[1] |= SCTLR_EnDA | SCTLR_EnDB;
+ /* Enable all PAC instructions */
+ env->cp15.hcr_el2 |= HCR_API;
+ env->cp15.scr_el3 |= SCR_API;
/* and to the FP/Neon instructions */
env->cp15.cpacr_el1 = deposit64(env->cp15.cpacr_el1, 20, 2, 3);
/* and to the SVE instructions */
--
2.17.2
- [Qemu-devel] [PATCH v2 14/27] target/arm: Move cpu_mmu_index out of line, (continued)
- [Qemu-devel] [PATCH v2 14/27] target/arm: Move cpu_mmu_index out of line, Richard Henderson, 2018/12/14
- [Qemu-devel] [PATCH v2 16/27] target/arm: Introduce arm_stage1_mmu_idx, Richard Henderson, 2018/12/14
- [Qemu-devel] [PATCH v2 12/27] target/arm: Decode PAuth within disas_uncond_b_reg, Richard Henderson, 2018/12/14
- [Qemu-devel] [PATCH v2 15/27] target/arm: Introduce arm_mmu_idx, Richard Henderson, 2018/12/14
- [Qemu-devel] [PATCH v2 17/27] target/arm: Create ARMVAParameters and helpers, Richard Henderson, 2018/12/14
- [Qemu-devel] [PATCH v2 22/27] target/arm: Implement pauth_addpac, Richard Henderson, 2018/12/14
- [Qemu-devel] [PATCH v2 21/27] target/arm: Implement pauth_auth, Richard Henderson, 2018/12/14
- [Qemu-devel] [PATCH v2 24/27] target/arm: Add PAuth system registers, Richard Henderson, 2018/12/14
- [Qemu-devel] [PATCH v2 18/27] target/arm: Reuse aa64_va_parameters for setting tbflags, Richard Henderson, 2018/12/14
- [Qemu-devel] [PATCH v2 25/27] target/arm: Enable PAuth for -cpu max, Richard Henderson, 2018/12/14
- [Qemu-devel] [PATCH v2 26/27] target/arm: Enable PAuth for user-only, part 2,
Richard Henderson <=
- [Qemu-devel] [PATCH v2 20/27] target/arm: Implement pauth_strip, Richard Henderson, 2018/12/14
- [Qemu-devel] [PATCH v2 23/27] target/arm: Implement pauth_computepac, Richard Henderson, 2018/12/14
- [Qemu-devel] [PATCH v2 27/27] target/arm: Tidy TBI handling in gen_a64_set_pc, Richard Henderson, 2018/12/14
- [Qemu-devel] [PATCH v2 19/27] target/arm: Export aa64_va_parameters to internals.h, Richard Henderson, 2018/12/14