From: Peter Zijlstra <peterz@infradead.org>
To: Borislav Petkov <bp@alien8.de>
Cc: suravee.suthikulpanit@amd.com, jroedel@suse.de,
Ingo Molnar <mingo@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: WARNING: CPU: 1 PID: 1 at kernel/events/core.c:7825 perf_pmu_register+0x385/0x390
Date: Sun, 24 Apr 2016 00:42:55 +0200 [thread overview]
Message-ID: <20160423224255.GB3430@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20160423130322.GH8531@pd.tnic>
On Sat, Apr 23, 2016 at 03:03:22PM +0200, Borislav Petkov wrote:
> Yo,
>
> did the fix for this go anywhere? I'm still seeing it on rc4+tip/master:
>
> [ 0.760493] AMD Power PMU detected
> [ 0.760689] LVT offset 0 assigned for vector 0x400
> [ 0.761072] perf: AMD IBS detected (0x000007ff)
> [ 0.761340] ------------[ cut here ]------------
> [ 0.761571] WARNING: CPU: 1 PID: 1 at kernel/events/core.c:7825 perf_pmu_register+0x385/0x390
> [ 0.761909] Modules linked in:
> [ 0.762093] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.6.0-rc4+ #1
> [ 0.762331] Hardware name: HP HP EliteBook 745 G3/807E, BIOS N73 Ver. 01.08 01/28/2016
> [ 0.762674] 0000000000000000 ffffffff812dafa9 0000000000000000 0000000000000000
> [ 0.763185] ffffffff810589ac ffffffff81a0fbe0 000000000000000a ffffffff8172ee85
> [ 0.763672] 0000000000000000 ffff88042bdf9130 000000000008b000 ffffffff8112ff55
> [ 0.764101] Call Trace:
> [ 0.764240] [<ffffffff812dafa9>] ? dump_stack+0x5c/0x83
> [ 0.764454] [<ffffffff810589ac>] ? __warn+0xec/0x110
> [ 0.764680] [<ffffffff8112ff55>] ? perf_pmu_register+0x385/0x390
> [ 0.764956] [<ffffffff81b1b51d>] ? msr_init+0xbe/0xbe
> [ 0.765202] [<ffffffff81b1b5f1>] ? amd_iommu_pc_init+0xd4/0x141
> [ 0.765475] [<ffffffff810003ef>] ? do_one_initcall+0xaf/0x200
> [ 0.765718] [<ffffffff810768eb>] ? parse_args+0x2ab/0x4c0
> [ 0.765935] [<ffffffff81b18fe1>] ? kernel_init_freeable+0x111/0x190
> [ 0.766175] [<ffffffff815df02a>] ? kernel_init+0xa/0x100
> [ 0.766389] [<ffffffff815eaa22>] ? ret_from_fork+0x22/0x40
> [ 0.766620] [<ffffffff815df020>] ? rest_init+0x90/0x90
> [ 0.766885] ---[ end trace 9285cdb6cf96a9b2 ]---
> [ 0.767120] perf: amd_iommu: Detected. (0 banks, 0 counters/bank)
>
Oh, cute there's two different ones.
31d50c551e30 ("perf/x86/amd/uncore: Do not register a task ctx for uncore PMUs")
Doth the below fixeth thingies?
---
Subject: perf/amd/iommu: Do not register a task ctx for uncore like PMUs
The new sanity check introduced by:
26657848502b ("perf/core: Verify we have a single perf_hw_context PMU")
... triggered on the AMD IOMMU driver.
IOMMUs are not per logical CPU, they cannot have per-task counters. Fix it.
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Cc: Joerg Roedel <jroedel@suse.de>
Reported-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
arch/x86/events/amd/iommu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/events/amd/iommu.c b/arch/x86/events/amd/iommu.c
index 40625ca7a190..6011a573dd64 100644
--- a/arch/x86/events/amd/iommu.c
+++ b/arch/x86/events/amd/iommu.c
@@ -474,6 +474,7 @@ static __init int _init_perf_amd_iommu(
static struct perf_amd_iommu __perf_iommu = {
.pmu = {
+ .task_ctx_nr = perf_invalid_context,
.event_init = perf_iommu_event_init,
.add = perf_iommu_add,
.del = perf_iommu_del,
next parent reply other threads:[~2016-04-23 22:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20160423130322.GH8531@pd.tnic>
2016-04-23 22:42 ` Peter Zijlstra [this message]
2016-04-24 14:54 ` Borislav Petkov
2016-05-05 9:44 ` [tip:perf/core] perf/x86/amd/iommu: Do not register a task ctx for uncore like PMUs tip-bot for Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160423224255.GB3430@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bp@alien8.de \
--cc=jroedel@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=suravee.suthikulpanit@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®