1

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
This commit is contained in:
Namhyung Kim 2023-11-30 11:52:46 +05:30 committed by Ingo Molnar
parent cb4a6ccf35
commit 0f9e0d7928

View File

@ -287,6 +287,9 @@ static int perf_ibs_init(struct perf_event *event)
if (config & ~perf_ibs->config_mask)
return -EINVAL;
if (has_branch_stack(event))
return -EOPNOTSUPP;
ret = validate_group(event);
if (ret)
return ret;