[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 33/34] target/arm: check TGE and E2H flags for EL
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH v3 33/34] target/arm: check TGE and E2H flags for EL0 pauth traps |
Date: |
Sat, 3 Aug 2019 11:47:59 -0700 |
From: Alex Bennée <address@hidden>
According to ARM ARM we should only trap from EL0
when TCG or E2H are 0.
Signed-off-by: Alex Bennée <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
---
target/arm/pauth_helper.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/target/arm/pauth_helper.c b/target/arm/pauth_helper.c
index 42c9141bb7..9fa002068e 100644
--- a/target/arm/pauth_helper.c
+++ b/target/arm/pauth_helper.c
@@ -371,7 +371,9 @@ static void pauth_check_trap(CPUARMState *env, int el,
uintptr_t ra)
if (el < 2 && arm_feature(env, ARM_FEATURE_EL2)) {
uint64_t hcr = arm_hcr_el2_eff(env);
bool trap = !(hcr & HCR_API);
- /* FIXME: ARMv8.1-VHE: trap only applies to EL1&0 regime. */
+ if (el < 1) {
+ trap &= !(hcr & HCR_TGE) | !(hcr & HCR_E2H);
+ }
/* FIXME: ARMv8.3-NV: HCR_NV trap takes precedence for ERETA[AB]. */
if (trap) {
pauth_trap(env, 2, ra);
--
2.17.1
- [Qemu-devel] [PATCH v3 24/34] target/arm: Update arm_sctlr for VHE, (continued)
- [Qemu-devel] [PATCH v3 24/34] target/arm: Update arm_sctlr for VHE, Richard Henderson, 2019/08/03
- [Qemu-devel] [PATCH v3 27/34] target/arm: Install asids for E2&0 translation regime, Richard Henderson, 2019/08/03
- [Qemu-devel] [PATCH v3 25/34] target/arm: Update aa64_zva_access for EL2, Richard Henderson, 2019/08/03
- [Qemu-devel] [PATCH v3 26/34] target/arm: Update ctr_el0_access for EL2, Richard Henderson, 2019/08/03
- [Qemu-devel] [PATCH v3 28/34] target/arm: Flush tlbs for E2&0 translation regime, Richard Henderson, 2019/08/03
- [Qemu-devel] [PATCH v3 30/34] target/arm: Update regime_is_user for EL2&0, Richard Henderson, 2019/08/03
- [Qemu-devel] [PATCH v3 32/34] target/arm: Enable ARMv8.1-VHE in -cpu max, Richard Henderson, 2019/08/03
- [Qemu-devel] [PATCH v3 34/34] target/arm: generate a custom MIDR for -cpu max, Richard Henderson, 2019/08/03
- [Qemu-devel] [PATCH v3 31/34] target/arm: Update {fp, sve}_exception_el for VHE, Richard Henderson, 2019/08/03
- [Qemu-devel] [PATCH v3 29/34] target/arm: Update arm_phys_excp_target_el for TGE, Richard Henderson, 2019/08/03
- [Qemu-devel] [PATCH v3 33/34] target/arm: check TGE and E2H flags for EL0 pauth traps,
Richard Henderson <=
- Re: [Qemu-devel] [PATCH v3 00/34] target/arm: Implement ARMv8.1-VHE, Alex Bennée, 2019/08/05