Skip to contentSkip to conversation

powerpc/perf: Disable trace_imc pmu

PATCH Superseded Madhavan Srinivasan 2 participants 3 messages Nov 14, 2019 PowerPC

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/perf: Disable trace_imc pmu

When a root user or a user with CAP_SYS_ADMIN privilege use trace_imc performance monitoring unit events, to monitor application or KVM threads, may result in a checkstop (System crash). Reason being frequent switch of the "trace/accumulation" mode of In-Memory Collection hardware.
This patch disables trace_imc pmu unit, but will be re-enabled at a later stage with a fix patchset.

---
 arch/powerpc/platforms/powernv/opal-imc.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
arch/powerpc/platforms/powernv/opal-imc.c +6 -1
index e04b20625cb9..5790f078771f 100644
@@ -285,7 +285,12 @@ static int opal_imc_counters_probe(struct platform_device *pdev)
 			domain = IMC_DOMAIN_THREAD;
 			break;
 		case IMC_TYPE_TRACE:
-			domain = IMC_DOMAIN_TRACE;
+			/* Using trace_imc events to monitor
+			 * application or KVM thread performances
+			 * may result in a checkstop (system crash).
+			 * So disabling it for now.
+			 */
+			domain = -1;
 			break;
 		default:
 			pr_warn("IMC Unknown Device type \n");
Signature · 1 line
2.21.0
#1 lore raw
Quoted 32 lines · Madhavan Srinivasan

When a root user or a user with CAP_SYS_ADMIN privilege use trace_imc performance monitoring unit events, to monitor application or KVM threads, may result in a checkstop (System crash). Reason being frequent switch of the "trace/accumulation" mode of In-Memory Collection hardware.
This patch disables trace_imc pmu unit, but will be re-enabled at a later stage with a fix patchset.

---
 arch/powerpc/platforms/powernv/opal-imc.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
arch/powerpc/platforms/powernv/opal-imc.c +6 -2
index e04b20625cb9..5790f078771f 100644
@@ -285,7 +285,12 @@ static int opal_imc_counters_probe(struct platform_device *pdev)
                        domain = IMC_DOMAIN_THREAD;
                        break;
                case IMC_TYPE_TRACE:
-                       domain = IMC_DOMAIN_TRACE;
+                       /* Using trace_imc events to monitor
+                        * application or KVM thread performances
+                        * may result in a checkstop (system crash).
+                        * So disabling it for now.
+                        */
+                       domain = -1;
                        break;
                default:
                        pr_warn("IMC Unknown Device type \n");
--
Quoted 2 lines

2.21.0

Does this need a Fixes: tag?

author
#2 lore raw
Quoted 28 lines · Oliver O'Halloran
Quoted 26 lines · Madhavan Srinivasan

When a root user or a user with CAP_SYS_ADMIN privilege use trace_imc performance monitoring unit events, to monitor application or KVM threads, may result in a checkstop (System crash). Reason being frequent switch of the "trace/accumulation" mode of In-Memory Collection hardware.
This patch disables trace_imc pmu unit, but will be re-enabled at a later stage with a fix patchset.

---
  arch/powerpc/platforms/powernv/opal-imc.c | 7 ++++++-
  1 file changed, 6 insertions(+), 1 deletion(-)
arch/powerpc/platforms/powernv/opal-imc.c +5 -1
index e04b20625cb9..5790f078771f 100644
@@ -285,7 +285,12 @@ static int opal_imc_counters_probe(struct platform_device *pdev)
                         domain = IMC_DOMAIN_THREAD;
                         break;
                 case IMC_TYPE_TRACE:
-                       domain = IMC_DOMAIN_TRACE;
+                       /* Using trace_imc events to monitor
+                        * application or KVM thread performances
+                        * may result in a checkstop (system crash).
+                        * So disabling it for now.
+                        */
Quoted 8 lines
Quoted 7 lines
arch/powerpc/platforms/powernv/opal-imc.c +1 -1
+                       domain = -1;
                         break;
                 default:
                         pr_warn("IMC Unknown Device type \n");
--

2.21.0

Does this need a Fixes: tag?

I was thinking of adding this commit as a fixes tag for fix patchset. But if thats not right, i can add the fixes tag along with a request to send to Stable and post a v2

Maddy