diff options
author | Kan Liang <kan.liang@linux.intel.com> | 2018-04-25 20:57:17 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-04-25 21:41:22 +0200 |
commit | 4e949e9b9d1e3edcdab3b54656c5851bd9e49c67 (patch) | |
tree | 13ba7875d137a83f1c330c8a7476d3267da50050 /tools/perf/builtin-stat.c | |
parent | Linux 4.17-rc2 (diff) | |
download | linux-4e949e9b9d1e3edcdab3b54656c5851bd9e49c67.tar.xz linux-4e949e9b9d1e3edcdab3b54656c5851bd9e49c67.zip |
perf/x86/intel: Don't enable freeze-on-smi for PerfMon V1
The SMM freeze feature was introduced since PerfMon V2. But the current
code unconditionally enables the feature for all platforms. It can
generate #GP exception, if the related FREEZE_WHILE_SMM bit is set for
the machine with PerfMon V1.
To disable the feature for PerfMon V1, perf needs to
- Remove the freeze_on_smi sysfs entry by moving intel_pmu_attrs to
intel_pmu, which is only applied to PerfMon V2 and later.
- Check the PerfMon version before flipping the SMM bit when starting CPU
Fixes: 6089327f5424 ("perf/x86: Add sysfs entry to freeze counters on SMI")
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: ak@linux.intel.com
Cc: eranian@google.com
Cc: acme@redhat.com
Link: https://lkml.kernel.org/r/1524682637-63219-1-git-send-email-kan.liang@linux.intel.com
Diffstat (limited to 'tools/perf/builtin-stat.c')
0 files changed, 0 insertions, 0 deletions