linux/arch/x86/events/intel
Song Liu f3fd84a3b7 x86/perf: Fix snapshot_branch_stack warning in VM
When running in VM intel_pmu_snapshot_branch_stack triggers WRMSR warning
like:

 [ ] unchecked MSR access error: WRMSR to 0x3f1 (tried to write 0x0000000000000000) at rIP: 0xffffffff81011a5b (intel_pmu_snapshot_branch_stack+0x3b/0xd0)

This can be triggered with BPF selftests:

  tools/testing/selftests/bpf/test_progs -t get_branch_snapshot

This warning is caused by __intel_pmu_pebs_disable_all() in the VM.
Since it is not necessary to disable PEBS for LBR, remove it from
intel_pmu_snapshot_branch_stack and intel_pmu_snapshot_arch_branch_stack.

Fixes: c22ac2a3d4 ("perf: Enable branch record for software events")
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Like Xu <likexu@tencent.com>
Link: https://lore.kernel.org/r/20211112054510.2667030-1-songliubraving@fb.com
2021-11-17 14:48:43 +01:00
..
bts.c perf/x86: Add compiler barrier after updating BTS 2021-09-17 15:08:38 +02:00
core.c x86/perf: Fix snapshot_branch_stack warning in VM 2021-11-17 14:48:43 +01:00
cstate.c perf/x86/cstate: Add ICELAKE_X and ICELAKE_D support 2021-07-02 15:58:33 +02:00
ds.c Core: 2021-11-02 06:20:58 -07:00
knc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
lbr.c perf/x86/lbr: Reset LBR_SELECT during vlbr reset 2021-11-11 13:09:34 +01:00
Makefile perf/x86/intel/uncore: Parse uncore discovery tables 2021-04-02 10:04:54 +02:00
p4.c Perf events changes in this cycle were: 2021-04-28 13:03:44 -07:00
p6.c x86/cpu: Rename cpu_data.x86_mask to cpu_data.x86_stepping 2018-02-15 01:15:52 +01:00
pt.c perf/x86/intel: Replace deprecated CPU-hotplug functions 2021-08-26 09:14:36 +02:00
pt.h perf/x86/intel/pt: Prevent redundant WRMSRs 2019-11-13 11:06:18 +01:00
uncore_discovery.c perf/x86/intel/uncore: Support IIO free-running counters on Sapphire Rapids server 2021-07-02 15:58:41 +02:00
uncore_discovery.h perf/x86/intel/uncore: Fix invalid unit check 2021-08-31 13:59:35 +02:00
uncore_nhmex.c perf/x86/intel/uncore: Correct fixed counter index check for NHM 2018-05-31 12:36:28 +02:00
uncore_snb.c perf/x86/intel/uncore: Add Alder Lake support 2021-04-19 20:03:29 +02:00
uncore_snbep.c perf/x86/intel/uncore: Fix IIO event constraints for Snowridge 2021-11-17 14:48:43 +01:00
uncore.c perf/x86/intel/uncore: Use to_pci_driver() instead of pci_dev->driver 2021-10-18 09:20:15 -05:00
uncore.h perf/x86/intel/uncore: Add alias PMU name 2021-07-02 15:58:40 +02:00