]> git.karo-electronics.de Git - linux-beck.git/commitdiff
KVM: PMU: warn when pin control is set in eventsel msr
authorGleb Natapov <gleb@redhat.com>
Sun, 26 Feb 2012 14:55:40 +0000 (16:55 +0200)
committerAvi Kivity <avi@redhat.com>
Thu, 8 Mar 2012 12:13:18 +0000 (14:13 +0200)
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>
arch/x86/include/asm/perf_event.h
arch/x86/kvm/pmu.c

index 096c975e099fee9ed2578b9ca4d9f77d9ef56006..f1f71823f6828b5cd88640a6d6144bbb3a63e066 100644 (file)
@@ -23,6 +23,7 @@
 #define ARCH_PERFMON_EVENTSEL_USR                      (1ULL << 16)
 #define ARCH_PERFMON_EVENTSEL_OS                       (1ULL << 17)
 #define ARCH_PERFMON_EVENTSEL_EDGE                     (1ULL << 18)
+#define ARCH_PERFMON_EVENTSEL_PIN_CONTROL              (1ULL << 19)
 #define ARCH_PERFMON_EVENTSEL_INT                      (1ULL << 20)
 #define ARCH_PERFMON_EVENTSEL_ANY                      (1ULL << 21)
 #define ARCH_PERFMON_EVENTSEL_ENABLE                   (1ULL << 22)
index 3e48c1d3edcdebea6578de7f90df8a60fd6fc5e5..6af9a542e541543088572201a8262242e08b71e7 100644 (file)
@@ -210,6 +210,9 @@ static void reprogram_gp_counter(struct kvm_pmc *pmc, u64 eventsel)
        unsigned config, type = PERF_TYPE_RAW;
        u8 event_select, unit_mask;
 
+       if (eventsel & ARCH_PERFMON_EVENTSEL_PIN_CONTROL)
+               printk_once("kvm pmu: pin control bit is ignored\n");
+
        pmc->eventsel = eventsel;
 
        stop_counter(pmc);