xen: Make VPMU init message look less scary
Subsystems (2)
Juergen Gross
maintainerPATCH v3 1/1 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.
---
V3: support older hypervisors returning ENOSYS as requested by
Jan Beulich
V2: modify error message as suggested by Konrad Wilk
--- arch/x86/xen/pmu.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
arch/x86/xen/pmu.c +5 -2
@@ -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 ); }
Signature · 7 lines
2.6.6 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 9 lines · Juergen Gross
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 <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Juergen Gross
maintainerQuoted 9 lines · Juergen Gross
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 <[email protected]>
David, could you take this patch, please?
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
David Vrabel
AppliedQuoted 7 lines · Juergen Gross
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.
Applied to for-linus-4.9, thanks.
David
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel