Commit 0f9e0d79 authored by Namhyung Kim's avatar Namhyung Kim Committed by Ingo Molnar

perf/x86/amd: Reject branch stack for IBS events

The AMD IBS PMU doesn't handle branch stacks, so it should not accept
events with brstack.
Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
Signed-off-by: default avatarRavi Bangoria <ravi.bangoria@amd.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20231130062246.290-1-ravi.bangoria@amd.com
parent cb4a6ccf
...@@ -287,6 +287,9 @@ static int perf_ibs_init(struct perf_event *event) ...@@ -287,6 +287,9 @@ static int perf_ibs_init(struct perf_event *event)
if (config & ~perf_ibs->config_mask) if (config & ~perf_ibs->config_mask)
return -EINVAL; return -EINVAL;
if (has_branch_stack(event))
return -EOPNOTSUPP;
ret = validate_group(event); ret = validate_group(event);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment