[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 04/24] target/arm: Adjust definition of CONTEXTIDR_EL2
From: |
Richard Henderson |
Subject: |
[PATCH v5 04/24] target/arm: Adjust definition of CONTEXTIDR_EL2 |
Date: |
Thu, 5 May 2022 13:49:46 -0500 |
This register is present for either VHE or Debugv8p2.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
v3: Rely on EL3-no-EL2 squashing during registration.
---
target/arm/helper.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/target/arm/helper.c b/target/arm/helper.c
index 72d05070f0..7b31c71980 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -7246,11 +7246,14 @@ static const ARMCPRegInfo jazelle_regs[] = {
.access = PL1_RW, .type = ARM_CP_CONST, .resetvalue = 0 },
};
+static const ARMCPRegInfo contextidr_el2 = {
+ .name = "CONTEXTIDR_EL2", .state = ARM_CP_STATE_AA64,
+ .opc0 = 3, .opc1 = 4, .crn = 13, .crm = 0, .opc2 = 1,
+ .access = PL2_RW,
+ .fieldoffset = offsetof(CPUARMState, cp15.contextidr_el[2])
+};
+
static const ARMCPRegInfo vhe_reginfo[] = {
- { .name = "CONTEXTIDR_EL2", .state = ARM_CP_STATE_AA64,
- .opc0 = 3, .opc1 = 4, .crn = 13, .crm = 0, .opc2 = 1,
- .access = PL2_RW,
- .fieldoffset = offsetof(CPUARMState, cp15.contextidr_el[2]) },
{ .name = "TTBR1_EL2", .state = ARM_CP_STATE_AA64,
.opc0 = 3, .opc1 = 4, .crn = 2, .crm = 0, .opc2 = 1,
.access = PL2_RW, .writefn = vmsa_tcr_ttbr_el2_write,
@@ -8215,6 +8218,10 @@ void register_cp_regs_for_features(ARMCPU *cpu)
define_one_arm_cp_reg(cpu, &ssbs_reginfo);
}
+ if (cpu_isar_feature(aa64_vh, cpu) ||
+ cpu_isar_feature(aa64_debugv8p2, cpu)) {
+ define_one_arm_cp_reg(cpu, &contextidr_el2);
+ }
if (arm_feature(env, ARM_FEATURE_EL2) && cpu_isar_feature(aa64_vh, cpu)) {
define_arm_cp_regs(cpu, vhe_reginfo);
}
--
2.34.1
- [PATCH v5 07/24] target/arm: Set ID_DFR0.PerfMon for qemu-system-arm -cpu max, (continued)
- [PATCH v5 07/24] target/arm: Set ID_DFR0.PerfMon for qemu-system-arm -cpu max, Richard Henderson, 2022/05/05
- [PATCH v5 03/24] target/arm: Merge zcr reginfo, Richard Henderson, 2022/05/05
- [PATCH v5 06/24] target/arm: Update qemu-system-arm -cpu max to cortex-a57, Richard Henderson, 2022/05/05
- [PATCH v5 02/24] target/arm: Drop EL3 no EL2 fallbacks, Richard Henderson, 2022/05/05
- [PATCH v5 05/24] target/arm: Move cortex impdef sysregs to cpu_tcg.c, Richard Henderson, 2022/05/05
- [PATCH v5 08/24] target/arm: Split out aa32_max_features, Richard Henderson, 2022/05/05
- [PATCH v5 01/24] target/arm: Handle cpreg registration for missing EL, Richard Henderson, 2022/05/05
- [PATCH v5 09/24] target/arm: Annotate arm_max_initfn with FEAT identifiers, Richard Henderson, 2022/05/05
- [PATCH v5 04/24] target/arm: Adjust definition of CONTEXTIDR_EL2,
Richard Henderson <=
- [PATCH v5 13/24] target/arm: Add minimal RAS registers, Richard Henderson, 2022/05/05
- [PATCH v5 10/24] target/arm: Use field names for manipulating EL2 and EL3 modes, Richard Henderson, 2022/05/05
- [PATCH v5 12/24] target/arm: Enable FEAT_Debugv8p4 for -cpu max, Richard Henderson, 2022/05/05
- [PATCH v5 11/24] target/arm: Enable FEAT_Debugv8p2 for -cpu max, Richard Henderson, 2022/05/05
- [PATCH v5 16/24] target/arm: Implement ESB instruction, Richard Henderson, 2022/05/05
- [PATCH v5 15/24] target/arm: Implement virtual SError exceptions, Richard Henderson, 2022/05/05
- [PATCH v5 17/24] target/arm: Enable FEAT_RAS for -cpu max, Richard Henderson, 2022/05/05
- [PATCH v5 19/24] target/arm: Enable FEAT_CSV2 for -cpu max, Richard Henderson, 2022/05/05
- [PATCH v5 20/24] target/arm: Enable FEAT_CSV2_2 for -cpu max, Richard Henderson, 2022/05/05