[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231130062246.290-1-ravi.bangoria@amd.com>
Date: Thu, 30 Nov 2023 11:52:46 +0530
From: Ravi Bangoria <ravi.bangoria@....com>
To: <peterz@...radead.org>, <acme@...nel.org>
CC: <ravi.bangoria@....com>, <mingo@...nel.org>, <jolsa@...nel.org>,
<irogers@...gle.com>, <adrian.hunter@...el.com>,
<eranian@...gle.com>, <linux-perf-users@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <sandipan.das@....com>,
<ananth.narayan@....com>, <santosh.shukla@....com>
Subject: [PATCH v2] perf/x86/amd: Reject branch stack for IBS events
From: Namhyung Kim <namhyung@...nel.org>
The AMD IBS PMU doesn't handle branch stacks, so it should not accept
events with brstack.
Signed-off-by: Namhyung Kim <namhyung@...nel.org>
Signed-off-by: Ravi Bangoria <ravi.bangoria@....com>
---
v1: https://lore.kernel.org/r/20230602194513.1589179-1-namhyung@kernel.org
v1->v2:
- Rebase on top of peterz/queue/perf/core
arch/x86/events/amd/ibs.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/events/amd/ibs.c b/arch/x86/events/amd/ibs.c
index 6911c5399d02..e91970b01d62 100644
--- a/arch/x86/events/amd/ibs.c
+++ b/arch/x86/events/amd/ibs.c
@@ -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;
--
2.34.1
Powered by blists - more mailing lists