Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0252937a authored by Juergen Gross's avatar Juergen Gross Committed by David Vrabel
Browse files

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: default avatarJuergen Gross <jgross@suse.com>
Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
parent 5b00b504
Loading
Loading
Loading
Loading
+5 −2
Original line number Original line Diff line number Diff line
@@ -547,6 +547,9 @@ void xen_pmu_init(int cpu)
	return;
	return;


fail:
fail:
	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",
		pr_info_once("Could not initialize VPMU for cpu %d, error %d\n",
			cpu, err);
			cpu, err);
	free_pages((unsigned long)xenpmu_data, 0);
	free_pages((unsigned long)xenpmu_data, 0);