Skip to content

Commit 0f9e0d7

Browse files
namhyungIngo Molnar
authored andcommitted
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: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20231130062246.290-1-ravi.bangoria@amd.com
1 parent cb4a6cc commit 0f9e0d7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/x86/events/amd/ibs.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,9 @@ static int perf_ibs_init(struct perf_event *event)
287287
if (config & ~perf_ibs->config_mask)
288288
return -EINVAL;
289289

290+
if (has_branch_stack(event))
291+
return -EOPNOTSUPP;
292+
290293
ret = validate_group(event);
291294
if (ret)
292295
return ret;

0 commit comments

Comments
 (0)