summaryrefslogtreecommitdiff
path: root/arch/x86/xen/pmu.c
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2016-08-02 09:22:12 +0200
committerDavid Vrabel <david.vrabel@citrix.com>2016-08-24 18:45:38 +0100
commit0252937a87e1d46a8261da85cbd99dffe612a2d3 (patch)
treeba55eccab2d0b57c3cffbe5e05b15010994ebfb1 /arch/x86/xen/pmu.c
parent5b00b504b13b2f0d1aa73d59cf8984726f19100f (diff)
xen: Make VPMU init message look less scary
The default for the Xen hypervisor is to not enable VPMU in order to avoid security issues. In this case the Linux kernel will issue the message "Could not initialize VPMU for cpu 0, error -95" which looks more like an error than a normal state. Change the message to something less scary in case the hypervisor returns EOPNOTSUPP or ENOSYS when trying to activate VPMU. Signed-off-by: Juergen Gross <jgross@suse.com> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Diffstat (limited to 'arch/x86/xen/pmu.c')
-rw-r--r--arch/x86/xen/pmu.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/xen/pmu.c b/arch/x86/xen/pmu.c
index 32bdc2c90297..b9fc52556bcc 100644
--- a/arch/x86/xen/pmu.c
+++ b/arch/x86/xen/pmu.c
@@ -547,8 +547,11 @@ void xen_pmu_init(int cpu)
return;
fail:
- pr_info_once("Could not initialize VPMU for cpu %d, error %d\n",
- cpu, err);
+ if (err == -EOPNOTSUPP || err == -ENOSYS)
+ pr_info_once("VPMU disabled by hypervisor.\n");
+ else
+ pr_info_once("Could not initialize VPMU for cpu %d, error %d\n",
+ cpu, err);
free_pages((unsigned long)xenpmu_data, 0);
}