* [PATCH v3] xen: Make VPMU init message look less scary
@ 2016-08-02 7:22 ` Juergen Gross
0 siblings, 0 replies; 7+ messages in thread
From: Juergen Gross @ 2016-08-02 7:22 UTC (permalink / raw)
To: linux-kernel, xen-devel; +Cc: boris.ostrovsky, david.vrabel, 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 <jgross@suse.com>
---
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(-)
diff --git a/arch/x86/xen/pmu.c b/arch/x86/xen/pmu.c
index 32bdc2c..b9fc525 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);
}
--
2.6.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v3] xen: Make VPMU init message look less scary
@ 2016-08-02 7:22 ` Juergen Gross
0 siblings, 0 replies; 7+ messages in thread
From: Juergen Gross @ 2016-08-02 7:22 UTC (permalink / raw)
To: linux-kernel, xen-devel; +Cc: Juergen Gross, boris.ostrovsky, david.vrabel
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>
---
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(-)
diff --git a/arch/x86/xen/pmu.c b/arch/x86/xen/pmu.c
index 32bdc2c..b9fc525 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);
}
--
2.6.6
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v3] xen: Make VPMU init message look less scary
2016-08-02 7:22 ` Juergen Gross
(?)
@ 2016-08-02 14:10 ` Boris Ostrovsky
-1 siblings, 0 replies; 7+ messages in thread
From: Boris Ostrovsky @ 2016-08-02 14:10 UTC (permalink / raw)
To: Juergen Gross, linux-kernel, xen-devel; +Cc: david.vrabel
[-- Attachment #1.1: Type: text/plain, Size: 543 bytes --]
On 08/02/2016 03:22 AM, Juergen Gross wrote:
> 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>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
[-- Attachment #1.2: Type: text/html, Size: 1116 bytes --]
[-- Attachment #2: Type: text/plain, Size: 127 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3] xen: Make VPMU init message look less scary
2016-08-02 7:22 ` Juergen Gross
@ 2016-08-18 6:01 ` Juergen Gross
-1 siblings, 0 replies; 7+ messages in thread
From: Juergen Gross @ 2016-08-18 6:01 UTC (permalink / raw)
To: david.vrabel; +Cc: linux-kernel, xen-devel, boris.ostrovsky
On 02/08/16 09:22, Juergen Gross wrote:
> 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>
David, could you take this patch, please?
Juergen
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3] xen: Make VPMU init message look less scary
@ 2016-08-18 6:01 ` Juergen Gross
0 siblings, 0 replies; 7+ messages in thread
From: Juergen Gross @ 2016-08-18 6:01 UTC (permalink / raw)
To: david.vrabel; +Cc: xen-devel, boris.ostrovsky, linux-kernel
On 02/08/16 09:22, Juergen Gross wrote:
> 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>
David, could you take this patch, please?
Juergen
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xen-devel] [PATCH v3] xen: Make VPMU init message look less scary
2016-08-02 7:22 ` Juergen Gross
@ 2016-08-24 17:47 ` David Vrabel
-1 siblings, 0 replies; 7+ messages in thread
From: David Vrabel @ 2016-08-24 17:47 UTC (permalink / raw)
To: Juergen Gross, linux-kernel, xen-devel; +Cc: boris.ostrovsky, david.vrabel
On 02/08/16 08:22, Juergen Gross wrote:
> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3] xen: Make VPMU init message look less scary
@ 2016-08-24 17:47 ` David Vrabel
0 siblings, 0 replies; 7+ messages in thread
From: David Vrabel @ 2016-08-24 17:47 UTC (permalink / raw)
To: Juergen Gross, linux-kernel, xen-devel; +Cc: boris.ostrovsky, david.vrabel
On 02/08/16 08:22, Juergen Gross wrote:
> 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
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-08-24 17:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-02 7:22 [PATCH v3] xen: Make VPMU init message look less scary Juergen Gross
2016-08-02 7:22 ` Juergen Gross
2016-08-02 14:10 ` Boris Ostrovsky
2016-08-18 6:01 ` Juergen Gross
2016-08-18 6:01 ` Juergen Gross
2016-08-24 17:47 ` [Xen-devel] " David Vrabel
2016-08-24 17:47 ` David Vrabel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.