Skip to content

target/arm: pmu fixes

Andrew Jones qemu-arm 1 version Applied

Status from this message: Applied to target-arm.next, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 7 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3target/arm: fix crash on pmu register accesstarget/arm/helper.c+4 -01 reply
2/3target/arm: cortex-a7 and cortex-a15 have pmustarget/arm/cpu.c+3 -02 replies
3/3target/arm: make pmccntr_op_start/finish statictarget/arm/cpu.h target/arm/helper.c+2 -131 reply

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchRichard HendersonAaron Lindsay
SeriesR-b
1/3R-b
2/3
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Qemu-arm] [PATCH 0/3] target/arm: pmu fixes

The first two patches fix a regression I found when running the arm (as opposed to arm64) pmu kvm-unit-tests test on tcg,

  $ git clone git://git.kernel.org/pub/scm/virt/kvm/kvm-unit-tests.git
  $ cd kvm-unit-tests
  $ ./configure --arch=arm --cross-prefix=arm-linux-gnu-
  $ make -j
  $ export QEMU=/path/to/qemu-system-arm or qemu-system-aarch64
  $ arm/run arm/pmu.flat

After checking the QEMU code I found it's also reproducible with the arm64 test if the PMU is removed,

  $ ./configure --arch=arm64 --cross-prefix=aarch64-linux-gnu-
  $ make -j
  $ export QEMU=/path/to/qemu-system-aarch64
  $ arm/run arm/pmu.flat -cpu cortex-a57,pmu=off

Those tests used to pass, but now QEMU was crashing. I've broken the fix into two patches because the second patch is a bit of an RFC since I don't know if it's safe to enable all ARM_FEATURE_PMU code for PMUv2. Maybe that feature is only for PMUv3? This patch also enables the pmu cpu property to work with those cpu types, i.e. we can now do '-cpu cortex-a15,pmu=off' to remove the pmu. Although it wasn't clear to me if the PMU is optional (permitted to be removed) on those cpu types from the manuals.

The last patch is just a trivial cleanup.

Andrew Jones (3):
target/arm: fix crash on pmu register access
target/arm: cortex-a7 and cortex-a15 have pmus
target/arm: make pmccntr_op_start/finish static

 target/arm/cpu.c    |  3 +++
 target/arm/cpu.h    | 11 -----------
 target/arm/helper.c |  8 ++++++--
 3 files changed, 9 insertions(+), 13 deletions(-)
Signature · 1 line
2.17.2