[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 3/9] target/arm: Make CNTPS_* UNDEF from Secure EL1 when Secur
From: |
Peter Maydell |
Subject: |
[PATCH v3 3/9] target/arm: Make CNTPS_* UNDEF from Secure EL1 when Secure EL2 is enabled |
Date: |
Tue, 4 Feb 2025 12:50:03 +0000 |
When we added Secure EL2 support, we missed that this needs an update
to the access code for the EL3 physical timer registers. These are
supposed to UNDEF from Secure EL1 when Secure EL2 is enabled.
Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Maydell <peter.maydell@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 ac8cb428925..7ec1e6cfaab 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -2387,6 +2387,9 @@ static CPAccessResult gt_stimer_access(CPUARMState *env,
if (!arm_is_secure(env)) {
return CP_ACCESS_UNDEFINED;
}
+ if (arm_is_el2_enabled(env)) {
+ return CP_ACCESS_UNDEFINED;
+ }
if (!(env->cp15.scr_el3 & SCR_ST)) {
return CP_ACCESS_TRAP_EL3;
}
--
2.34.1
- [PATCH v3 4/9] target/arm: Always apply CNTVOFF_EL2 for CNTV_TVAL_EL02 accesses, (continued)
- [PATCH v3 4/9] target/arm: Always apply CNTVOFF_EL2 for CNTV_TVAL_EL02 accesses, Peter Maydell, 2025/02/04
- [PATCH v3 1/9] target/arm: Apply correct timer offset when calculating deadlines, Peter Maydell, 2025/02/04
- [PATCH v3 7/9] target/arm: document the architectural names of our GTIMERs, Peter Maydell, 2025/02/04
- [PATCH v3 8/9] hw/arm: enable secure EL2 timers for virt machine, Peter Maydell, 2025/02/04
- [PATCH v3 2/9] target/arm: Don't apply CNTVOFF_EL2 for EL2_VIRT timer, Peter Maydell, 2025/02/04
- [PATCH v3 9/9] hw/arm: enable secure EL2 timers for sbsa machine, Peter Maydell, 2025/02/04
- [PATCH v3 6/9] target/arm: Implement SEL2 physical and virtual timers, Peter Maydell, 2025/02/04
- [PATCH v3 3/9] target/arm: Make CNTPS_* UNDEF from Secure EL1 when Secure EL2 is enabled,
Peter Maydell <=
- [PATCH v3 5/9] target/arm: Refactor handling of timer offset for direct register accesses, Peter Maydell, 2025/02/04
- Re: [PATCH v3 0/9] target/arm: Implement SEL2 physical and virtual timers, Peter Maydell, 2025/02/21