diff options
author | Song Liu <songliubraving@fb.com> | 2021-11-11 21:45:10 -0800 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2021-11-17 14:48:43 +0100 |
commit | f3fd84a3b7754b60df67ebfe64e1d90623895111 (patch) | |
tree | 80bfb788ff8a764e405ce3dc4f553a314d99f95d /kernel/power/hibernate.c | |
parent | bdc0feee05174418dec1fa68de2af19e1750b99f (diff) |
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: c22ac2a3d4bd ("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
Diffstat (limited to 'kernel/power/hibernate.c')
0 files changed, 0 insertions, 0 deletions