summaryrefslogtreecommitdiffstats
path: root/target-arm/helper.c
diff options
context:
space:
mode:
authorPeter Maydell2014-04-15 20:18:41 +0200
committerPeter Maydell2014-04-17 22:34:04 +0200
commit9225d739e7f6ec8d2139f79c3d2e3282cc725364 (patch)
treeb171ef430bafd6f99228a2753e88f53307b23458 /target-arm/helper.c
parenttarget-arm: Add v8 mmu translation support (diff)
downloadqemu-9225d739e7f6ec8d2139f79c3d2e3282cc725364.tar.gz
qemu-9225d739e7f6ec8d2139f79c3d2e3282cc725364.tar.xz
qemu-9225d739e7f6ec8d2139f79c3d2e3282cc725364.zip
target-arm: Don't mention PMU in debug feature register
Suppress the ID_AA64DFR0_EL1 PMUVer field, even if the CPU specific value claims that it exists. QEMU doesn't currently implement it, and not advertising it prevents the guest from trying to use it and getting UNDEFs on unimplemented registers. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> --- This is arguably a hack, but otherwise Linux tries to prod half a dozen PMU sysregs.
Diffstat (limited to 'target-arm/helper.c')
-rw-r--r--target-arm/helper.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/target-arm/helper.c b/target-arm/helper.c
index 4b6c1b6362..62f7fd3280 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -2036,7 +2036,12 @@ void register_cp_regs_for_features(ARMCPU *cpu)
{ .name = "ID_AA64DFR0_EL1", .state = ARM_CP_STATE_AA64,
.opc0 = 3, .opc1 = 0, .crn = 0, .crm = 5, .opc2 = 0,
.access = PL1_R, .type = ARM_CP_CONST,
- .resetvalue = cpu->id_aa64dfr0 },
+ /* We mask out the PMUVer field, beacuse we don't currently
+ * implement the PMU. Not advertising it prevents the guest
+ * from trying to use it and getting UNDEFs on registers we
+ * don't implement.
+ */
+ .resetvalue = cpu->id_aa64dfr0 & ~0xf00 },
{ .name = "ID_AA64DFR1_EL1", .state = ARM_CP_STATE_AA64,
.opc0 = 3, .opc1 = 0, .crn = 0, .crm = 5, .opc2 = 1,
.access = PL1_R, .type = ARM_CP_CONST,