target/arm: Provide ARMv8.4-PMU in '-cpu max'

Set the ID register bits to provide ARMv8.4-PMU (and implicitly
also ARMv8.1-PMU) in the 'max' CPU.

Backports commit 3bec78447a958d4819911252e056f29740ac25e4 from qemu
This commit is contained in:
Peter Maydell 2020-03-21 18:38:51 -04:00 committed by Lioncash
parent 4dd57f7acc
commit 28b239adb9

View file

@ -347,6 +347,14 @@ static void aarch64_max_initfn(struct uc_struct *uc, Object *obj, void *opaque)
u = FIELD_DP32(u, ID_MMFR3, PAN, 2); /* ATS1E1 */
cpu->id_mmfr3 = u;
u = cpu->isar.id_aa64dfr0;
u = FIELD_DP64(u, ID_AA64DFR0, PMUVER, 5); /* v8.4-PMU */
cpu->isar.id_aa64dfr0 = u;
u = cpu->isar.id_dfr0;
u = FIELD_DP32(u, ID_DFR0, PERFMON, 5); /* v8.4-PMU */
cpu->isar.id_dfr0 = u;
// Unicorn: we lie and enable them anyway
/*
* FIXME: We do not yet support ARMv8.2-fp16 for AArch32 yet,