linux-stable/arch/x86/events
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
..
amd perf/x86/amd/ibs: Add bitfield definitions in new <asm/amd-ibs.h> header 2021-08-26 09:14:36 +02:00
intel x86/perf: Fix snapshot_branch_stack warning in VM 2021-11-17 14:48:43 +01:00
zhaoxin x86: Fix various typos in comments 2021-03-18 15:31:53 +01:00
core.c perf updates: 2021-11-01 13:12:15 -07:00
Kconfig perf/amd/uncore: Allow the driver to be built as a module 2021-08-26 09:14:36 +02:00
Makefile perf/x86/rapl: Fix RAPL config variable bug 2020-06-02 11:52:56 +02:00
msr.c perf/x86/msr: Add Sapphire Rapids CPU support 2021-10-15 11:25:26 +02:00
perf_event.h Core: 2021-11-02 06:20:58 -07:00
probe.c perf/x86/rapl: Add msr mask support 2021-02-10 14:44:54 +01:00
probe.h perf/x86/rapl: Add msr mask support 2021-02-10 14:44:54 +01:00
rapl.c perf/x86/rapl: Use CPUID bit on AMD and Hygon parts 2021-06-01 21:10:33 +02:00