Browse Source

x86/intel_rdt: Disable PMU access

Peter is objecting to the direct PMU access in RDT. Right now the PMU usage
is broken anyway as it is not coordinated with perf.

Until this discussion settled, disable the PMU mechanics by simply
rejecting the type '2' measurement in the resctrl file.

Reported-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Reinette Chatre <reinette.chatre@intel.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: fenghua.yu@intel.com
Cc: tony.luck@intel.com
Cc: vikas.shivappa@linux.intel.com
CC: gavin.hindman@intel.com
Cc: jithu.joseph@intel.com
Cc: hpa@zytor.com
Thomas Gleixner 7 years ago
parent
commit
4a7a54a55e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c

+ 1 - 1
arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c

@@ -1171,7 +1171,7 @@ static ssize_t pseudo_lock_measure_trigger(struct file *file,
 	buf[buf_size] = '\0';
 	buf[buf_size] = '\0';
 	ret = kstrtoint(buf, 10, &sel);
 	ret = kstrtoint(buf, 10, &sel);
 	if (ret == 0) {
 	if (ret == 0) {
-		if (sel != 1 && sel != 2)
+		if (sel != 1)
 			return -EINVAL;
 			return -EINVAL;
 		ret = debugfs_file_get(file->f_path.dentry);
 		ret = debugfs_file_get(file->f_path.dentry);
 		if (ret)
 		if (ret)