[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 85/85] target/arm: Simplify condition for tlbi_el2_cp_reginfo[]
From: |
Peter Maydell |
Subject: |
[PULL 85/85] target/arm: Simplify condition for tlbi_el2_cp_reginfo[] |
Date: |
Fri, 13 Dec 2024 17:32:29 +0000 |
We currently register the tlbi_el2_cp_reginfo[] TLBI insns if EL2 is
implemented, or if EL3 and v8 is implemented. This is a copy of the
logic used for el2_cp_reginfo[], but for the specific case of the
TLBI insns we can simplify it. This is because we do not need the
"if EL2 does not exist but EL3 does then EL2 registers should exist
and be RAZ/WI" handling here: all our cpregs are for instructions,
which UNDEF when EL3 exists and EL2 does not.
Simplify the condition down to just "if EL2 exists".
This is not a behaviour change because:
* for AArch64 insns we marked them with ARM_CP_EL3_NO_EL2_UNDEF,
which meant that define_arm_cp_regs() would ignore them if
EL2 wasn't present
* for AArch32 insns, the .access = PL2_W meant that if EL2
was not present the only way to get at them was from AArch32
EL3; but we have no CPUs which have ARM_FEATURE_V8 but
start in AArch32
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20241210160452.2427965-11-peter.maydell@linaro.org
---
target/arm/tcg/tlb-insns.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/target/arm/tcg/tlb-insns.c b/target/arm/tcg/tlb-insns.c
index d20d32624da..0f67294edc4 100644
--- a/target/arm/tcg/tlb-insns.c
+++ b/target/arm/tcg/tlb-insns.c
@@ -1246,9 +1246,7 @@ void define_tlb_insn_regs(ARMCPU *cpu)
* ops (i.e. matching the condition for el2_cp_reginfo[] in
* helper.c), but we will be able to simplify this later.
*/
- if (arm_feature(env, ARM_FEATURE_EL2)
- || (arm_feature(env, ARM_FEATURE_EL3)
- && arm_feature(env, ARM_FEATURE_V8))) {
+ if (arm_feature(env, ARM_FEATURE_EL2)) {
define_arm_cp_regs(cpu, tlbi_el2_cp_reginfo);
}
if (arm_feature(env, ARM_FEATURE_EL3)) {
--
2.34.1
- [PULL 76/85] target/arm: Move some TLBI insns to their own source file, (continued)
- [PULL 76/85] target/arm: Move some TLBI insns to their own source file, Peter Maydell, 2024/12/13
- [PULL 79/85] target/arm: Move the AArch64 EL2 TLBI insns, Peter Maydell, 2024/12/13
- [PULL 78/85] target/arm: Move AArch64 TLBI insns from v8_cp_reginfo[], Peter Maydell, 2024/12/13
- [PULL 83/85] target/arm: Move small helper functions to tlb-insns.c, Peter Maydell, 2024/12/13
- [PULL 71/85] docs/system/arm/orangepi: update links, Peter Maydell, 2024/12/13
- [PULL 74/85] docs/system/arm/virt: document missing properties, Peter Maydell, 2024/12/13
- [PULL 73/85] docs/system/arm/xlnx-versal-virt: document ospi-flash property, Peter Maydell, 2024/12/13
- [PULL 77/85] target/arm: Move TLBI insns for AArch32 EL2 to tlbi_insn_helper.c, Peter Maydell, 2024/12/13
- [PULL 82/85] target/arm: Move the TLBI OS insns to tlb-insns.c., Peter Maydell, 2024/12/13
- [PULL 84/85] target/arm: Move RME TLB insns to tlb-insns.c, Peter Maydell, 2024/12/13
- [PULL 85/85] target/arm: Simplify condition for tlbi_el2_cp_reginfo[],
Peter Maydell <=
- Re: [PULL 00/85] target-arm queue, Stefan Hajnoczi, 2024/12/16