lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Fri, 07 Jun 2024 14:31:25 -0600
From: "Rob Herring (Arm)" <robh@...nel.org>
To: Russell King <linux@...linux.org.uk>, 
 Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>, 
 Arnaldo Carvalho de Melo <acme@...nel.org>, 
 Namhyung Kim <namhyung@...nel.org>, Mark Rutland <mark.rutland@....com>, 
 Alexander Shishkin <alexander.shishkin@...ux.intel.com>, 
 Jiri Olsa <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>, 
 Adrian Hunter <adrian.hunter@...el.com>, Will Deacon <will@...nel.org>, 
 Marc Zyngier <maz@...nel.org>, Oliver Upton <oliver.upton@...ux.dev>, 
 James Morse <james.morse@....com>, 
 Suzuki K Poulose <suzuki.poulose@....com>, 
 Zenghui Yu <yuzenghui@...wei.com>, 
 Catalin Marinas <catalin.marinas@....com>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org, 
 linux-perf-users@...r.kernel.org, kvmarm@...ts.linux.dev
Subject: [PATCH 0/9] arm64: Add support for Armv9.4 PMU fixed instruction
 counter

This series adds support for the optional fixed instruction counter 
added in Armv9.4 PMU. Most of the series is a refactoring to remove the 
index to counter number conversion which dates back to the Armv7 PMU 
driver. Removing it is necessary in order to support more than 32 
counters without a bunch of conditional code further complicating the 
conversion.

Patches 1-2 move the 32-bit Arm PMU drivers into drivers/perf/ and drop 
non-DT probe support. These can be taken first if there's no comments on 
them.

Patch 3 changes struct arm_pmu.num_events to a bitmap of events, and 
updates all the users. This removes the index to counter conversion 
on the PMUv3 and Armv7 drivers.

Patch 4 updates various register accessors to use 64-bit values matching 
the register size.

Patches 5-6 update KVM PMU register accesses to use shared accessors 
from asm/arm_pmuv3.h.

Patches 7-8 rework KVM and perf PMU defines for counter indexes and 
number of counters.

Patch 9 finally adds support for the fixed instruction counter.

I tested this on FVP with VHE host and a guest. I tested the Armv7 PMU 
changes with QEMU.

Signed-off-by: Rob Herring (Arm) <robh@...nel.org>
---
Rob Herring (Arm) (9):
      perf/arm: Move 32-bit PMU drivers to drivers/perf/
      perf: arm_v6/7_pmu: Drop non-DT probe support
      perf: arm_pmu: Remove event index to counter remapping
      perf: arm_pmuv3: Prepare for more than 32 counters
      KVM: arm64: pmu: Use arm_pmuv3.h register accessors
      KVM: arm64: pmu: Use generated define for PMSELR_EL0.SEL access
      arm64: perf/kvm: Use a common PMU cycle counter define
      KVM: arm64: Refine PMU defines for number of counters
      perf: arm_pmuv3: Add support for Armv9.4 PMU instruction counter

 arch/arm/include/asm/arm_pmuv3.h                   |  23 ++++
 arch/arm/kernel/Makefile                           |   2 -
 arch/arm64/include/asm/arm_pmuv3.h                 |  56 ++++++++-
 arch/arm64/include/asm/kvm_host.h                  |   8 +-
 arch/arm64/include/asm/sysreg.h                    |   1 -
 arch/arm64/kvm/pmu-emul.c                          |  14 +--
 arch/arm64/kvm/pmu.c                               |  88 ++++---------
 arch/arm64/kvm/sys_regs.c                          |  11 +-
 arch/arm64/tools/sysreg                            |  30 +++++
 drivers/perf/Kconfig                               |  12 ++
 drivers/perf/Makefile                              |   3 +
 drivers/perf/arm_pmu.c                             |  11 +-
 drivers/perf/arm_pmuv3.c                           | 138 ++++++++++-----------
 .../perf_event_v6.c => drivers/perf/arm_v6_pmu.c   |  26 +---
 .../perf_event_v7.c => drivers/perf/arm_v7_pmu.c   |  90 +++++---------
 .../perf/arm_xscale_pmu.c                          |  15 +--
 include/kvm/arm_pmu.h                              |   8 +-
 include/linux/perf/arm_pmu.h                       |  10 +-
 include/linux/perf/arm_pmuv3.h                     |   7 +-
 19 files changed, 289 insertions(+), 264 deletions(-)
---
base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
change-id: 20240607-arm-pmu-3-9-icntr-04375ddd0082

Best regards,
-- 
Rob Herring (Arm) <robh@...nel.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ