The patch series adds support for power10 PMU hardware. Patches 1..3 are the clean up patches which refactors the way how PMU SPR's are stored in core-book3s and in KVM book3s, as well as update data type for PMU cache_events. Patches 12 and 13 adds base support for perf extended register capability in powerpc. Support for extended regs in power10 is covered in patches 14,15 Other patches includes main changes to support for power10 PMU. Anju T Sudhakar (2): powerpc/perf: Add support for outputting extended regs in perf intr_regs tools/perf: Add perf tools support for extended register capability in powerpc Athira Rajeev (10): powerpc/perf: Update cpu_hw_event to use `struct` for storing MMCR registers KVM: PPC: Book3S HV: Cleanup updates for kvm vcpu MMCR powerpc/perf: Update Power PMU cache_events to u64 type KVM: PPC: Book3S HV: Save/restore new PMU registers powerpc/perf: power10 Performance Monitoring support powerpc/perf: Ignore the BHRB kernel address filtering for P10 powerpc/perf: Add Power10 BHRB filter support for PERF_SAMPLE_BRANCH_IND_CALL/COND powerpc/perf: BHRB control to disable BHRB logic when not used powerpc/perf: Add extended regs support for power10 platform tools/perf: Add perf tools support for extended regs in power10 Madhavan Srinivasan (3): powerpc/perf: Add support for ISA3.1 PMU SPRs powerpc/xmon: Add PowerISA v3.1 PMU SPRs powerpc/perf: Add power10_feat to dt_cpu_ftrs --- Changes from v2 -> v3 - Addressed review comments from Michael Neuling, Michael Ellerman, Gautham Shenoy and Paul Mackerras Changes from v1 -> v2 - Added support for extended regs in powerpc for power9/power10 platform ( patches 12 to 15) - Addressed change/removal of some event codes in the PMU driver --- Documentation/virt/kvm/api.rst | 3 + arch/powerpc/include/asm/kvm_book3s_asm.h | 2 +- arch/powerpc/include/asm/kvm_host.h | 6 +- arch/powerpc/include/asm/perf_event_server.h | 22 +- arch/powerpc/include/asm/processor.h | 4 + arch/powerpc/include/asm/reg.h | 9 + arch/powerpc/include/uapi/asm/kvm.h | 9 +- arch/powerpc/include/uapi/asm/perf_regs.h | 20 +- arch/powerpc/kernel/asm-offsets.c | 5 + arch/powerpc/kernel/cpu_setup_power.S | 8 + arch/powerpc/kernel/dt_cpu_ftrs.c | 26 ++ arch/powerpc/kernel/sysfs.c | 8 + arch/powerpc/kvm/book3s_hv.c | 38 ++- arch/powerpc/kvm/book3s_hv_interrupts.S | 8 + arch/powerpc/kvm/book3s_hv_rmhandlers.S | 36 +- arch/powerpc/perf/Makefile | 2 +- arch/powerpc/perf/core-book3s.c | 108 ++++-- arch/powerpc/perf/generic-compat-pmu.c | 2 +- arch/powerpc/perf/internal.h | 1 + arch/powerpc/perf/isa207-common.c | 91 +++-- arch/powerpc/perf/isa207-common.h | 37 ++- arch/powerpc/perf/mpc7450-pmu.c | 23 +- arch/powerpc/perf/perf_regs.c | 44 ++- arch/powerpc/perf/power10-events-list.h | 70 ++++ arch/powerpc/perf/power10-pmu.c | 425 ++++++++++++++++++++++++ arch/powerpc/perf/power5+-pmu.c | 19 +- arch/powerpc/perf/power5-pmu.c | 19 +- arch/powerpc/perf/power6-pmu.c | 18 +- arch/powerpc/perf/power7-pmu.c | 19 +- arch/powerpc/perf/power8-pmu.c | 2 +- arch/powerpc/perf/power9-pmu.c | 8 +- arch/powerpc/perf/ppc970-pmu.c | 26 +- arch/powerpc/platforms/powernv/idle.c | 22 +- arch/powerpc/xmon/xmon.c | 13 + tools/arch/powerpc/include/uapi/asm/kvm.h | 9 +- tools/arch/powerpc/include/uapi/asm/perf_regs.h | 20 +- tools/perf/arch/powerpc/include/perf_regs.h | 8 +- tools/perf/arch/powerpc/util/header.c | 9 +- tools/perf/arch/powerpc/util/perf_regs.c | 55 +++ tools/perf/arch/powerpc/util/utils_header.h | 15 + 40 files changed, 1117 insertions(+), 152 deletions(-) create mode 100644 arch/powerpc/perf/power10-events-list.h create mode 100644 arch/powerpc/perf/power10-pmu.c create mode 100644 tools/perf/arch/powerpc/util/utils_header.h -- 1.8.3.1