perf/x86: Fix MSR PMU driver
authorPeter Zijlstra <peterz@infradead.org>
Thu, 6 Aug 2015 15:26:58 +0000 (17:26 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 12 Aug 2015 09:43:20 +0000 (11:43 +0200)
commit19b3340cf58d14decf2898fc795cc2b1fa49e79e
tree527fff56ba3f0c79f29ed0787bc5e61b3d5251d9
parent3d325bf0da91ca5d22f2525a72308dafd4fc0977
perf/x86: Fix MSR PMU driver

Currently we only update the sysfs event files per available MSR, we
didn't actually disallow creating unlisted events.

Rework things such that the dectection, sysfs listing and event
creation are better coordinated.

Sadly it appears it's impossible to probe R/O MSRs under virt. This
means we have to do the full model table to avoid listing all MSRs all
the time.

Tested-by: Kan Liang <kan.liang@intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Andy Lutomirski <luto@amacapital.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/cpu/perf_event_msr.c