Skip to contentSkip to conversation

xen: Make VPMU init message look less scary

PATCH Superseded Juergen Gross 3 participants 8 messages Aug 1, 2016

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Juergen Gross

author maintainer
#0 lore raw

PATCH 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 when trying to activate VPMU.

---
 arch/x86/xen/pmu.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
arch/x86/xen/pmu.c +5 -2
index 32bdc2c..e9d66fa 100644
@@ -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)
+		pr_info_once("VPMU usage disabled due to Xen settings\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 · 1 line
2.6.6
reviewer Reviewed-by on v1 1/1
#1 lore raw
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 when trying to activate VPMU.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

reviewer Reviewed-by on v1 1/1
#2 lore raw
In reply to Juergen Gross
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 when trying to activate VPMU.

#3 lore raw
In reply to Juergen Gross
Quoted 18 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 when trying to activate VPMU.

---
 arch/x86/xen/pmu.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
arch/x86/xen/pmu.c +0 -0
index 32bdc2c..e9d66fa 100644

arch/x86/xen/pmu.c void xen_pmu_init(int cpu) · line 551

Quoted 7 lines
arch/x86/xen/pmu.c +2 -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)
+		pr_info_once("VPMU usage disabled due to Xen settings\n");

How about 'VPMU disabled by hypevisor.'

Quoted 14 lines
arch/x86/xen/pmu.c +3 -0
+	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

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#4 lore raw
In reply to Juergen Gross
Quoted 18 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 when trying to activate VPMU.

---
 arch/x86/xen/pmu.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
arch/x86/xen/pmu.c +0 -0
index 32bdc2c..e9d66fa 100644

arch/x86/xen/pmu.c void xen_pmu_init(int cpu) · line 551

Quoted 7 lines
arch/x86/xen/pmu.c +2 -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)
+		pr_info_once("VPMU usage disabled due to Xen settings\n");

How about 'VPMU disabled by hypevisor.'

Quoted 14 lines
arch/x86/xen/pmu.c +3 -0
+	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
author maintainer
#5 lore raw
Quoted 21 lines · Konrad Rzeszutek Wilk
Quoted 20 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 when trying to activate VPMU.

---
 arch/x86/xen/pmu.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
arch/x86/xen/pmu.c +0 -0
index 32bdc2c..e9d66fa 100644
@@ -547,8 +547,11 @@ void xen_pmu_init(int cpu)
 	return;
 
Quoted 7 lines

arch/x86/xen/pmu.c void xen_pmu_init(int cpu) · line 551

Quoted 5 lines
arch/x86/xen/pmu.c +2 -2
 fail:
-	pr_info_once("Could not initialize VPMU for cpu %d, error %d\n",
-		cpu, err);
+	if (err == -EOPNOTSUPP)
+		pr_info_once("VPMU usage disabled due to Xen settings\n");

How about 'VPMU disabled by hypevisor.'

Hmm, why not. Boris, are you okay with this message, too?

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#6 lore raw
Quoted 22 lines · Juergen Gross
Quoted 21 lines · Konrad Rzeszutek Wilk
Quoted 20 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 when trying to activate VPMU.

---
 arch/x86/xen/pmu.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
arch/x86/xen/pmu.c +0 -0
index 32bdc2c..e9d66fa 100644
@@ -547,8 +547,11 @@ void xen_pmu_init(int cpu)
 	return;
 
Quoted 7 lines
Quoted 6 lines

arch/x86/xen/pmu.c void xen_pmu_init(int cpu) · line 551

Quoted 5 lines
arch/x86/xen/pmu.c +2 -2
 fail:
-	pr_info_once("Could not initialize VPMU for cpu %d, error %d\n",
-		cpu, err);
+	if (err == -EOPNOTSUPP)
+		pr_info_once("VPMU usage disabled due to Xen settings\n");

How about 'VPMU disabled by hypevisor.'

Hmm, why not. Boris, are you okay with this message, too?

Sure.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#7 lore raw
In reply to Juergen Gross
Quoted 22 lines · Juergen Gross
Quoted 21 lines · Konrad Rzeszutek Wilk
Quoted 20 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 when trying to activate VPMU.

---
 arch/x86/xen/pmu.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
arch/x86/xen/pmu.c +0 -0
index 32bdc2c..e9d66fa 100644
@@ -547,8 +547,11 @@ void xen_pmu_init(int cpu)
 	return;
 
Quoted 7 lines
Quoted 6 lines

arch/x86/xen/pmu.c void xen_pmu_init(int cpu) · line 551

Quoted 5 lines
arch/x86/xen/pmu.c +2 -2
 fail:
-	pr_info_once("Could not initialize VPMU for cpu %d, error %d\n",
-		cpu, err);
+	if (err == -EOPNOTSUPP)
+		pr_info_once("VPMU usage disabled due to Xen settings\n");

How about 'VPMU disabled by hypevisor.'

Hmm, why not. Boris, are you okay with this message, too?

Sure.