aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/events/core.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c
index c17f0de5fd39..ba1335d16529 100644
--- a/arch/x86/events/core.c
+++ b/arch/x86/events/core.c
@@ -262,10 +262,13 @@ static bool check_hw_exists(void)
262 return true; 262 return true;
263 263
264msr_fail: 264msr_fail:
265 pr_cont("Broken PMU hardware detected, using software events only.\n"); 265 if (boot_cpu_has(X86_FEATURE_HYPERVISOR)) {
266 printk("%sFailed to access perfctr msr (MSR %x is %Lx)\n", 266 pr_cont("PMU not available due to virtualization, using software events only.\n");
267 boot_cpu_has(X86_FEATURE_HYPERVISOR) ? KERN_INFO : KERN_ERR, 267 } else {
268 reg, val_new); 268 pr_cont("Broken PMU hardware detected, using software events only.\n");
269 pr_err("Failed to access perfctr msr (MSR %x is %Lx)\n",
270 reg, val_new);
271 }
269 272
270 return false; 273 return false;
271} 274}