Message ID | 20220409000742.293691-9-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show |
Series | target/arm: Implement features Debugv8p4, RAS, IESB | expand |
On Sat, 9 Apr 2022 at 01:18, Richard Henderson <richard.henderson@linaro.org> wrote: > > The only portion of FEAT_Debugv8p2 that is relevant to QEMU > is CONTEXTIDR_EL2, which is also conditionally implemented > with FEAT_VHE. The rest of the debug extension concerns the > External debug interface, which is outside the scope of QEMU. > > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- > target/arm/cpu.c | 1 + > target/arm/cpu64.c | 1 + > target/arm/cpu_tcg.c | 2 ++ > 3 files changed, 4 insertions(+) Reviewed-by: Peter Maydell <peter.maydell@linaro.org> thanks -- PMM
On Mon, 11 Apr 2022 at 14:09, Peter Maydell <peter.maydell@linaro.org> wrote: > > On Sat, 9 Apr 2022 at 01:18, Richard Henderson > <richard.henderson@linaro.org> wrote: > > > > The only portion of FEAT_Debugv8p2 that is relevant to QEMU > > is CONTEXTIDR_EL2, which is also conditionally implemented > > with FEAT_VHE. The rest of the debug extension concerns the > > External debug interface, which is outside the scope of QEMU. > > > > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > > --- > > target/arm/cpu.c | 1 + > > target/arm/cpu64.c | 1 + > > target/arm/cpu_tcg.c | 2 ++ > > 3 files changed, 4 insertions(+) > Reviewed-by: Peter Maydell <peter.maydell@linaro.org> ...except that I've just remembered that this patch, and the others in this and the other series that add support for new FEAT_* need to update the list in docs/system/arm/emulation.rst of all the features we implement. thanks -- PMM
diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 6521f350f9..d815d3a397 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1800,6 +1800,7 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp) * feature registers as well. */ cpu->isar.id_pfr1 = FIELD_DP32(cpu->isar.id_pfr1, ID_PFR1, SECURITY, 0); + cpu->isar.id_dfr0 = FIELD_DP32(cpu->isar.id_dfr0, ID_DFR0, COPSDBG, 0); cpu->isar.id_aa64pfr0 = FIELD_DP64(cpu->isar.id_aa64pfr0, ID_AA64PFR0, EL3, 0); } diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c index ae7114ea79..6b6422070d 100644 --- a/target/arm/cpu64.c +++ b/target/arm/cpu64.c @@ -854,6 +854,7 @@ static void aarch64_max_initfn(Object *obj) cpu->isar.id_aa64zfr0 = t; t = cpu->isar.id_aa64dfr0; + t = FIELD_DP64(t, ID_AA64DFR0, DEBUGVER, 8); /* FEAT_Debugv8p2 */ t = FIELD_DP64(t, ID_AA64DFR0, PMUVER, 5); /* FEAT_PMUv3p4 */ cpu->isar.id_aa64dfr0 = t; diff --git a/target/arm/cpu_tcg.c b/target/arm/cpu_tcg.c index 9d5cd6ea00..ac91bbea9b 100644 --- a/target/arm/cpu_tcg.c +++ b/target/arm/cpu_tcg.c @@ -79,6 +79,8 @@ void arm32_max_features(ARMCPU *cpu) cpu->isar.id_pfr2 = t; t = cpu->isar.id_dfr0; + t = FIELD_DP32(t, ID_DFR0, COPDBG, 8); /* FEAT_Debugv8p2 */ + t = FIELD_DP32(t, ID_DFR0, COPSDBG, 8); /* FEAT_Debugv8p2 */ t = FIELD_DP32(t, ID_DFR0, PERFMON, 5); /* FEAT_PMUv3p4 */ cpu->isar.id_dfr0 = t; }
The only portion of FEAT_Debugv8p2 that is relevant to QEMU is CONTEXTIDR_EL2, which is also conditionally implemented with FEAT_VHE. The rest of the debug extension concerns the External debug interface, which is outside the scope of QEMU. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- target/arm/cpu.c | 1 + target/arm/cpu64.c | 1 + target/arm/cpu_tcg.c | 2 ++ 3 files changed, 4 insertions(+)