summaryrefslogtreecommitdiffstats
path: root/target/arm/cpu.h
diff options
context:
space:
mode:
authorRichard Henderson2020-02-07 15:04:24 +0100
committerPeter Maydell2020-02-07 15:04:24 +0100
commitaaec143212bb70ac9549cf73203d13100bd5c7c2 (patch)
treef55498e65b73419c73b87afdea29063bf98d20fc /target/arm/cpu.h
parenttarget/arm: Update arm_mmu_idx for VHE (diff)
downloadqemu-aaec143212bb70ac9549cf73203d13100bd5c7c2.tar.gz
qemu-aaec143212bb70ac9549cf73203d13100bd5c7c2.tar.xz
qemu-aaec143212bb70ac9549cf73203d13100bd5c7c2.zip
target/arm: Update arm_sctlr for VHE
Use the correct sctlr for EL2&0 regime. Due to header ordering, and where arm_mmu_idx_el is declared, we need to move the function out of line. Use the function in many more places in order to select the correct control. Tested-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20200206105448.4726-23-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm/cpu.h')
-rw-r--r--target/arm/cpu.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index 3fc0e6e746..68e11f0eda 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -3141,15 +3141,7 @@ static inline bool arm_sctlr_b(CPUARMState *env)
(env->cp15.sctlr_el[1] & SCTLR_B) != 0;
}
-static inline uint64_t arm_sctlr(CPUARMState *env, int el)
-{
- if (el == 0) {
- /* FIXME: ARMv8.1-VHE S2 translation regime. */
- return env->cp15.sctlr_el[1];
- } else {
- return env->cp15.sctlr_el[el];
- }
-}
+uint64_t arm_sctlr(CPUARMState *env, int el);
static inline bool arm_cpu_data_is_big_endian_a32(CPUARMState *env,
bool sctlr_b)