* [PATCH] perf/x86/amd: Reject branch stack for IBS events
@ 2023-06-02 19:45 Namhyung Kim
2023-06-06 4:38 ` Ravi Bangoria
0 siblings, 1 reply; 10+ messages in thread
From: Namhyung Kim @ 2023-06-02 19:45 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar
Cc: Arnaldo Carvalho de Melo, Jiri Olsa, Ian Rogers, Adrian Hunter,
LKML, Stephane Eranian, Ravi Bangoria
The AMD IBS PMU doesn't handle branch stacks, so it should not accept
events with brstack.
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
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 371014802191..607a692ba8ce 100644
--- a/arch/x86/events/amd/ibs.c
+++ b/arch/x86/events/amd/ibs.c
@@ -265,6 +265,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;
+
if (hwc->sample_period) {
if (config & perf_ibs->cnt_mask)
/* raw max_cnt may not be set */
--
2.41.0.rc2.161.g9c6817b8e7-goog
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] perf/x86/amd: Reject branch stack for IBS events
2023-06-02 19:45 [PATCH] perf/x86/amd: Reject branch stack for IBS events Namhyung Kim
@ 2023-06-06 4:38 ` Ravi Bangoria
2023-11-23 14:45 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 10+ messages in thread
From: Ravi Bangoria @ 2023-06-06 4:38 UTC (permalink / raw)
To: Namhyung Kim, Peter Zijlstra
Cc: Arnaldo Carvalho de Melo, Jiri Olsa, Ian Rogers, Adrian Hunter,
LKML, Stephane Eranian, Ingo Molnar, Ravi Bangoria
On 03-Jun-23 1:15 AM, Namhyung Kim wrote:
> The AMD IBS PMU doesn't handle branch stacks, so it should not accept
> events with brstack.
>
> Cc: Ravi Bangoria <ravi.bangoria@amd.com>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Reviewed-by: Ravi Bangoria <ravi.bangoria@amd.com>
Thanks!
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] perf/x86/amd: Reject branch stack for IBS events
2023-06-06 4:38 ` Ravi Bangoria
@ 2023-11-23 14:45 ` Arnaldo Carvalho de Melo
2023-11-24 4:00 ` Ravi Bangoria
0 siblings, 1 reply; 10+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-11-23 14:45 UTC (permalink / raw)
To: Ravi Bangoria
Cc: Namhyung Kim, Peter Zijlstra, Jiri Olsa, Ian Rogers,
Adrian Hunter, LKML, Stephane Eranian, Ingo Molnar
Em Tue, Jun 06, 2023 at 10:08:43AM +0530, Ravi Bangoria escreveu:
> On 03-Jun-23 1:15 AM, Namhyung Kim wrote:
> > The AMD IBS PMU doesn't handle branch stacks, so it should not accept
> > events with brstack.
> >
> > Cc: Ravi Bangoria <ravi.bangoria@amd.com>
> > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
>
> Reviewed-by: Ravi Bangoria <ravi.bangoria@amd.com>
It seems this patch was not merged, can you please check?
- Arnaldo
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] perf/x86/amd: Reject branch stack for IBS events
2023-11-23 14:45 ` Arnaldo Carvalho de Melo
@ 2023-11-24 4:00 ` Ravi Bangoria
2023-11-27 14:32 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 10+ messages in thread
From: Ravi Bangoria @ 2023-11-24 4:00 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Peter Zijlstra, Namhyung Kim
Cc: Jiri Olsa, Ian Rogers, Adrian Hunter, LKML, Stephane Eranian,
Ingo Molnar, Ravi Bangoria
On 23-Nov-23 8:15 PM, Arnaldo Carvalho de Melo wrote:
> Em Tue, Jun 06, 2023 at 10:08:43AM +0530, Ravi Bangoria escreveu:
>> On 03-Jun-23 1:15 AM, Namhyung Kim wrote:
>>> The AMD IBS PMU doesn't handle branch stacks, so it should not accept
>>> events with brstack.
>>>
>>> Cc: Ravi Bangoria <ravi.bangoria@amd.com>
>>> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
>>
>> Reviewed-by: Ravi Bangoria <ravi.bangoria@amd.com>
>
> It seems this patch was not merged, can you please check?
Right. And it does not apply cleanly on peterz/queue.git/perf/core, since
surrounding code has changed.
Thanks,
Ravi
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] perf/x86/amd: Reject branch stack for IBS events
2023-11-24 4:00 ` Ravi Bangoria
@ 2023-11-27 14:32 ` Arnaldo Carvalho de Melo
2023-11-30 6:28 ` Ravi Bangoria
0 siblings, 1 reply; 10+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-11-27 14:32 UTC (permalink / raw)
To: Ravi Bangoria
Cc: Peter Zijlstra, Namhyung Kim, Jiri Olsa, Ian Rogers,
Adrian Hunter, LKML, Stephane Eranian, Ingo Molnar
Em Fri, Nov 24, 2023 at 09:30:37AM +0530, Ravi Bangoria escreveu:
> On 23-Nov-23 8:15 PM, Arnaldo Carvalho de Melo wrote:
> > Em Tue, Jun 06, 2023 at 10:08:43AM +0530, Ravi Bangoria escreveu:
> >> On 03-Jun-23 1:15 AM, Namhyung Kim wrote:
> >>> The AMD IBS PMU doesn't handle branch stacks, so it should not accept
> >>> events with brstack.
> >>>
> >>> Cc: Ravi Bangoria <ravi.bangoria@amd.com>
> >>> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> >>
> >> Reviewed-by: Ravi Bangoria <ravi.bangoria@amd.com>
> >
> > It seems this patch was not merged, can you please check?
>
> Right. And it does not apply cleanly on peterz/queue.git/perf/core, since
> surrounding code has changed.
Can you please refresh it if PeterZ has nothing against?
- Arnaldo
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] perf/x86/amd: Reject branch stack for IBS events
2023-11-27 14:32 ` Arnaldo Carvalho de Melo
@ 2023-11-30 6:28 ` Ravi Bangoria
2023-11-30 13:03 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 10+ messages in thread
From: Ravi Bangoria @ 2023-11-30 6:28 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Peter Zijlstra, Namhyung Kim, Jiri Olsa, Ian Rogers,
Adrian Hunter, LKML, Stephane Eranian, Ingo Molnar, Ravi Bangoria
On 27-Nov-23 8:02 PM, Arnaldo Carvalho de Melo wrote:
> Em Fri, Nov 24, 2023 at 09:30:37AM +0530, Ravi Bangoria escreveu:
>> On 23-Nov-23 8:15 PM, Arnaldo Carvalho de Melo wrote:
>>> Em Tue, Jun 06, 2023 at 10:08:43AM +0530, Ravi Bangoria escreveu:
>>>> On 03-Jun-23 1:15 AM, Namhyung Kim wrote:
>>>>> The AMD IBS PMU doesn't handle branch stacks, so it should not accept
>>>>> events with brstack.
>>>>>
>>>>> Cc: Ravi Bangoria <ravi.bangoria@amd.com>
>>>>> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
>>>>
>>>> Reviewed-by: Ravi Bangoria <ravi.bangoria@amd.com>
>>>
>>> It seems this patch was not merged, can you please check?
>>
>> Right. And it does not apply cleanly on peterz/queue.git/perf/core, since
>> surrounding code has changed.
>
> Can you please refresh it if PeterZ has nothing against?
Posted v2: https://lore.kernel.org/r/20231130062246.290-1-ravi.bangoria@amd.com
Thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] perf/x86/amd: Reject branch stack for IBS events
2023-11-30 6:28 ` Ravi Bangoria
@ 2023-11-30 13:03 ` Arnaldo Carvalho de Melo
2023-12-01 20:23 ` Namhyung Kim
0 siblings, 1 reply; 10+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-11-30 13:03 UTC (permalink / raw)
To: Peter Zijlstra, Ravi Bangoria
Cc: Namhyung Kim, Jiri Olsa, Ian Rogers, Adrian Hunter, LKML,
Stephane Eranian, Ingo Molnar
Em Thu, Nov 30, 2023 at 11:58:15AM +0530, Ravi Bangoria escreveu:
> On 27-Nov-23 8:02 PM, Arnaldo Carvalho de Melo wrote:
> > Em Fri, Nov 24, 2023 at 09:30:37AM +0530, Ravi Bangoria escreveu:
> >> On 23-Nov-23 8:15 PM, Arnaldo Carvalho de Melo wrote:
> >>> Em Tue, Jun 06, 2023 at 10:08:43AM +0530, Ravi Bangoria escreveu:
> >>>> On 03-Jun-23 1:15 AM, Namhyung Kim wrote:
> >>>>> 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>
> >>>> Reviewed-by: Ravi Bangoria <ravi.bangoria@amd.com>
> >>> It seems this patch was not merged, can you please check?
> >> Right. And it does not apply cleanly on peterz/queue.git/perf/core, since
> >> surrounding code has changed.
> > Can you please refresh it if PeterZ has nothing against?
> Posted v2: https://lore.kernel.org/r/20231130062246.290-1-ravi.bangoria@amd.com
Peter, can you please consider this one?
Thanks a lot!
- Arnaldo
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] perf/x86/amd: Reject branch stack for IBS events
2023-11-30 13:03 ` Arnaldo Carvalho de Melo
@ 2023-12-01 20:23 ` Namhyung Kim
2023-12-01 20:31 ` Arnaldo Carvalho de Melo
2023-12-04 19:37 ` Arnaldo Carvalho de Melo
0 siblings, 2 replies; 10+ messages in thread
From: Namhyung Kim @ 2023-12-01 20:23 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Peter Zijlstra, Ravi Bangoria, Jiri Olsa, Ian Rogers,
Adrian Hunter, LKML, Stephane Eranian, Ingo Molnar
On Thu, Nov 30, 2023 at 5:03 AM Arnaldo Carvalho de Melo
<acme@kernel.org> wrote:
>
> Em Thu, Nov 30, 2023 at 11:58:15AM +0530, Ravi Bangoria escreveu:
> > On 27-Nov-23 8:02 PM, Arnaldo Carvalho de Melo wrote:
> > > Em Fri, Nov 24, 2023 at 09:30:37AM +0530, Ravi Bangoria escreveu:
> > >> On 23-Nov-23 8:15 PM, Arnaldo Carvalho de Melo wrote:
> > >>> Em Tue, Jun 06, 2023 at 10:08:43AM +0530, Ravi Bangoria escreveu:
> > >>>> On 03-Jun-23 1:15 AM, Namhyung Kim wrote:
> > >>>>> 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>
> > >>>> Reviewed-by: Ravi Bangoria <ravi.bangoria@amd.com>
>
> > >>> It seems this patch was not merged, can you please check?
>
> > >> Right. And it does not apply cleanly on peterz/queue.git/perf/core, since
> > >> surrounding code has changed.
>
> > > Can you please refresh it if PeterZ has nothing against?
>
> > Posted v2: https://lore.kernel.org/r/20231130062246.290-1-ravi.bangoria@amd.com
>
> Peter, can you please consider this one?
The v2 is already in the tip tree. Thanks Ravi for doing this!
Namhyung
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] perf/x86/amd: Reject branch stack for IBS events
2023-12-01 20:23 ` Namhyung Kim
@ 2023-12-01 20:31 ` Arnaldo Carvalho de Melo
2023-12-04 19:37 ` Arnaldo Carvalho de Melo
1 sibling, 0 replies; 10+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-12-01 20:31 UTC (permalink / raw)
To: Namhyung Kim
Cc: Peter Zijlstra, Ravi Bangoria, Jiri Olsa, Ian Rogers,
Adrian Hunter, LKML, Stephane Eranian, Ingo Molnar
Em Fri, Dec 01, 2023 at 12:23:16PM -0800, Namhyung Kim escreveu:
> On Thu, Nov 30, 2023 at 5:03 AM Arnaldo Carvalho de Melo
> <acme@kernel.org> wrote:
> >
> > Em Thu, Nov 30, 2023 at 11:58:15AM +0530, Ravi Bangoria escreveu:
> > > On 27-Nov-23 8:02 PM, Arnaldo Carvalho de Melo wrote:
> > > > Em Fri, Nov 24, 2023 at 09:30:37AM +0530, Ravi Bangoria escreveu:
> > > >> On 23-Nov-23 8:15 PM, Arnaldo Carvalho de Melo wrote:
> > > >>> Em Tue, Jun 06, 2023 at 10:08:43AM +0530, Ravi Bangoria escreveu:
> > > >>>> On 03-Jun-23 1:15 AM, Namhyung Kim wrote:
> > > >>>>> 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>
> > > >>>> Reviewed-by: Ravi Bangoria <ravi.bangoria@amd.com>
> >
> > > >>> It seems this patch was not merged, can you please check?
> >
> > > >> Right. And it does not apply cleanly on peterz/queue.git/perf/core, since
> > > >> surrounding code has changed.
> >
> > > > Can you please refresh it if PeterZ has nothing against?
> >
> > > Posted v2: https://lore.kernel.org/r/20231130062246.290-1-ravi.bangoria@amd.com
> >
> > Peter, can you please consider this one?
>
> The v2 is already in the tip tree. Thanks Ravi for doing this!
> Namhyung
yay!
- Arnaldo
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] perf/x86/amd: Reject branch stack for IBS events
2023-12-01 20:23 ` Namhyung Kim
2023-12-01 20:31 ` Arnaldo Carvalho de Melo
@ 2023-12-04 19:37 ` Arnaldo Carvalho de Melo
1 sibling, 0 replies; 10+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-12-04 19:37 UTC (permalink / raw)
To: Namhyung Kim, Ingo Molnar, Ravi Bangoria
Cc: Peter Zijlstra, Jiri Olsa, Ian Rogers, Adrian Hunter, LKML,
Stephane Eranian
Em Fri, Dec 01, 2023 at 12:23:16PM -0800, Namhyung Kim escreveu:
> On Thu, Nov 30, 2023 at 5:03 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > Em Thu, Nov 30, 2023 at 11:58:15AM +0530, Ravi Bangoria escreveu:
> > > On 27-Nov-23 8:02 PM, Arnaldo Carvalho de Melo wrote:
> > > > Em Fri, Nov 24, 2023 at 09:30:37AM +0530, Ravi Bangoria escreveu:
> > > >> On 23-Nov-23 8:15 PM, Arnaldo Carvalho de Melo wrote:
> > > >>> Em Tue, Jun 06, 2023 at 10:08:43AM +0530, Ravi Bangoria escreveu:
> > > >>>> On 03-Jun-23 1:15 AM, Namhyung Kim wrote:
> > > >>>>> 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>
> > > >>>> Reviewed-by: Ravi Bangoria <ravi.bangoria@amd.com>
> >
> > > >>> It seems this patch was not merged, can you please check?
> >
> > > >> Right. And it does not apply cleanly on peterz/queue.git/perf/core, since
> > > >> surrounding code has changed.
> > > > Can you please refresh it if PeterZ has nothing against?
> > > Posted v2: https://lore.kernel.org/r/20231130062246.290-1-ravi.bangoria@amd.com
> > Peter, can you please consider this one?
> The v2 is already in the tip tree. Thanks Ravi for doing this!
Yeap, I just checked and Ingo merged it, thanks everybody!
- Arnaldo
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-12-04 19:37 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-02 19:45 [PATCH] perf/x86/amd: Reject branch stack for IBS events Namhyung Kim
2023-06-06 4:38 ` Ravi Bangoria
2023-11-23 14:45 ` Arnaldo Carvalho de Melo
2023-11-24 4:00 ` Ravi Bangoria
2023-11-27 14:32 ` Arnaldo Carvalho de Melo
2023-11-30 6:28 ` Ravi Bangoria
2023-11-30 13:03 ` Arnaldo Carvalho de Melo
2023-12-01 20:23 ` Namhyung Kim
2023-12-01 20:31 ` Arnaldo Carvalho de Melo
2023-12-04 19:37 ` Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox