diff options
author | Gleb Natapov <gleb@redhat.com> | 2012-02-26 09:55:40 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-03-08 07:13:18 -0500 |
commit | a7b9d2ccc3d86303ee9314612d301966e04011c7 (patch) | |
tree | 955dc7c9346e4aa34dddff9b1d3dd54253d783d0 /arch/x86 | |
parent | 9ee73970c03edb68146ceb1ba2a7033c99a5e017 (diff) |
KVM: PMU: warn when pin control is set in eventsel msr
Print warning once if pin control bit is set in eventsel msr since
emulation does not support it yet.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/include/asm/perf_event.h | 1 | ||||
-rw-r--r-- | arch/x86/kvm/pmu.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/include/asm/perf_event.h b/arch/x86/include/asm/perf_event.h index 096c975e099f..f1f71823f682 100644 --- a/arch/x86/include/asm/perf_event.h +++ b/arch/x86/include/asm/perf_event.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #define ARCH_PERFMON_EVENTSEL_USR (1ULL << 16) | 23 | #define ARCH_PERFMON_EVENTSEL_USR (1ULL << 16) |
24 | #define ARCH_PERFMON_EVENTSEL_OS (1ULL << 17) | 24 | #define ARCH_PERFMON_EVENTSEL_OS (1ULL << 17) |
25 | #define ARCH_PERFMON_EVENTSEL_EDGE (1ULL << 18) | 25 | #define ARCH_PERFMON_EVENTSEL_EDGE (1ULL << 18) |
26 | #define ARCH_PERFMON_EVENTSEL_PIN_CONTROL (1ULL << 19) | ||
26 | #define ARCH_PERFMON_EVENTSEL_INT (1ULL << 20) | 27 | #define ARCH_PERFMON_EVENTSEL_INT (1ULL << 20) |
27 | #define ARCH_PERFMON_EVENTSEL_ANY (1ULL << 21) | 28 | #define ARCH_PERFMON_EVENTSEL_ANY (1ULL << 21) |
28 | #define ARCH_PERFMON_EVENTSEL_ENABLE (1ULL << 22) | 29 | #define ARCH_PERFMON_EVENTSEL_ENABLE (1ULL << 22) |
diff --git a/arch/x86/kvm/pmu.c b/arch/x86/kvm/pmu.c index 3e48c1d3edcd..6af9a542e541 100644 --- a/arch/x86/kvm/pmu.c +++ b/arch/x86/kvm/pmu.c | |||
@@ -210,6 +210,9 @@ static void reprogram_gp_counter(struct kvm_pmc *pmc, u64 eventsel) | |||
210 | unsigned config, type = PERF_TYPE_RAW; | 210 | unsigned config, type = PERF_TYPE_RAW; |
211 | u8 event_select, unit_mask; | 211 | u8 event_select, unit_mask; |
212 | 212 | ||
213 | if (eventsel & ARCH_PERFMON_EVENTSEL_PIN_CONTROL) | ||
214 | printk_once("kvm pmu: pin control bit is ignored\n"); | ||
215 | |||
213 | pmc->eventsel = eventsel; | 216 | pmc->eventsel = eventsel; |
214 | 217 | ||
215 | stop_counter(pmc); | 218 | stop_counter(pmc); |