[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 02/25] target/arm: Stub arm_hcr_el2_eff for m-profile
From: |
Richard Henderson |
Subject: |
[PATCH v3 02/25] target/arm: Stub arm_hcr_el2_eff for m-profile |
Date: |
Tue, 21 Feb 2023 16:33:13 -1000 |
M-profile doesn't have HCR_EL2. While we could test features
before each call, zero is a generally safe return value to
disable the code in the caller. This test is required to
avoid an assert in arm_is_secure_below_el3.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/helper.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target/arm/helper.c b/target/arm/helper.c
index 07d4100365..37d9267fb4 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -5788,6 +5788,9 @@ uint64_t arm_hcr_el2_eff_secstate(CPUARMState *env, bool
secure)
uint64_t arm_hcr_el2_eff(CPUARMState *env)
{
+ if (arm_feature(env, ARM_FEATURE_M)) {
+ return 0;
+ }
return arm_hcr_el2_eff_secstate(env, arm_is_secure_below_el3(env));
}
--
2.34.1
- [PATCH v3 00/25] target/arm: Implement FEAT_RME, Richard Henderson, 2023/02/21
- [PATCH v3 02/25] target/arm: Stub arm_hcr_el2_eff for m-profile,
Richard Henderson <=
- [PATCH v3 03/25] target/arm: Diagnose incorrect usage of arm_is_secure subroutines, Richard Henderson, 2023/02/21
- [PATCH v3 01/25] target/arm: Handle m-profile in arm_is_secure, Richard Henderson, 2023/02/21
- [PATCH v3 04/25] target/arm: Rewrite check_s2_mmu_setup, Richard Henderson, 2023/02/21
- [PATCH v3 10/25] include/exec/memattrs: Add two bits of space to MemTxAttrs, Richard Henderson, 2023/02/21
- [PATCH v3 08/25] target/arm: Add RME cpregs, Richard Henderson, 2023/02/21