Skip to content

Commit 249fad7

Browse files
Madhavan Srinivasanmpe
authored andcommitted
powerpc/perf: Disable trace_imc pmu
When a root user or a user with CAP_SYS_ADMIN privilege uses any trace_imc performance monitoring unit events, to monitor application or KVM threads, it may result in a checkstop (System crash). The cause is frequent switching of the "trace/accumulation" mode of the In-Memory Collection hardware (LDBAR). This patch disables the trace_imc PMU unit entirely to avoid triggering the checkstop. A future patch will reenable it at a later stage once a workaround has been developed. Fixes: 012ae24 ("powerpc/perf: Trace imc PMU functions") Cc: [email protected] # v5.2+ Signed-off-by: Madhavan Srinivasan <[email protected]> Tested-by: Hariharan T.S. <[email protected]> [mpe: Add pr_info_once() so dmesg shows the PMU has been disabled] Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 48e626a commit 249fad7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

arch/powerpc/platforms/powernv/opal-imc.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,14 @@ static int opal_imc_counters_probe(struct platform_device *pdev)
278278
domain = IMC_DOMAIN_THREAD;
279279
break;
280280
case IMC_TYPE_TRACE:
281-
domain = IMC_DOMAIN_TRACE;
281+
/*
282+
* FIXME. Using trace_imc events to monitor application
283+
* or KVM thread performance can cause a checkstop
284+
* (system crash).
285+
* Disable it for now.
286+
*/
287+
pr_info_once("IMC: disabling trace_imc PMU\n");
288+
domain = -1;
282289
break;
283290
default:
284291
pr_warn("IMC Unknown Device type \n");

0 commit comments

Comments
 (0)