diff options
| author | Richard Henderson <richard.henderson@linaro.org> | 2020-02-07 14:04:21 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2020-02-07 14:04:21 +0000 |
| commit | e2a1a4616c86159eb4c07659a02fff8bb25d3729 (patch) | |
| tree | b5cbef5cfd9ae294dfe2a7d77e7b86033c75fb94 /target/arm/helper.c | |
| parent | 03c76131bc494366a4357a1d265c5eb5cc820754 (diff) | |
| download | focaccia-qemu-e2a1a4616c86159eb4c07659a02fff8bb25d3729.tar.gz focaccia-qemu-e2a1a4616c86159eb4c07659a02fff8bb25d3729.zip | |
target/arm: Add CONTEXTIDR_EL2
Not all of the breakpoint types are supported, but those that only examine contextidr are extended to support the new register. 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-4-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm/helper.c')
| -rw-r--r-- | target/arm/helper.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/target/arm/helper.c b/target/arm/helper.c index f5ce05fdf3..fe7991864a 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -6126,6 +6126,14 @@ static const ARMCPRegInfo jazelle_regs[] = { REGINFO_SENTINEL }; +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]) }, + REGINFO_SENTINEL +}; + void register_cp_regs_for_features(ARMCPU *cpu) { /* Register all the coprocessor registers based on feature bits */ @@ -7089,6 +7097,10 @@ void register_cp_regs_for_features(ARMCPU *cpu) define_arm_cp_regs(cpu, lor_reginfo); } + if (arm_feature(env, ARM_FEATURE_EL2) && cpu_isar_feature(aa64_vh, cpu)) { + define_arm_cp_regs(cpu, vhe_reginfo); + } + if (cpu_isar_feature(aa64_sve, cpu)) { define_one_arm_cp_reg(cpu, &zcr_el1_reginfo); if (arm_feature(env, ARM_FEATURE_EL2)) { |