]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - arch/x86/events/core.c
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[mirror_ubuntu-zesty-kernel.git] / arch / x86 / events / core.c
index c17f0de5fd391c3ce000df6428802521384d179f..d0efb5cb1b00ece9656805cc62124454d00cda2d 100644 (file)
@@ -17,7 +17,8 @@
 #include <linux/notifier.h>
 #include <linux/hardirq.h>
 #include <linux/kprobes.h>
-#include <linux/module.h>
+#include <linux/export.h>
+#include <linux/init.h>
 #include <linux/kdebug.h>
 #include <linux/sched.h>
 #include <linux/uaccess.h>
@@ -262,10 +263,13 @@ static bool check_hw_exists(void)
        return true;
 
 msr_fail:
-       pr_cont("Broken PMU hardware detected, using software events only.\n");
-       printk("%sFailed to access perfctr msr (MSR %x is %Lx)\n",
-               boot_cpu_has(X86_FEATURE_HYPERVISOR) ? KERN_INFO : KERN_ERR,
-               reg, val_new);
+       if (boot_cpu_has(X86_FEATURE_HYPERVISOR)) {
+               pr_cont("PMU not available due to virtualization, using software events only.\n");
+       } else {
+               pr_cont("Broken PMU hardware detected, using software events only.\n");
+               pr_err("Failed to access perfctr msr (MSR %x is %Lx)\n",
+                      reg, val_new);
+       }
 
        return false;
 }