Skip to contentSkip to conversation

xen: use hvc console for dom0

PATCH In review Juergen Gross 5 participants 17 messages Feb 26, 2018 – Mar 2, 2018

Subsystems (2)
lore
Share & tools
lore

Juergen Gross

author maintainer
#0 lore raw

PATCH 1/1 xen: use hvc console for dom0

Today the hvc console is added as a preferred console for pv domUs only. As this requires a boot parameter for getting dom0 messages per default add it for dom0, too.

---
 arch/x86/xen/enlighten_pv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/x86/xen/enlighten_pv.c +3 -1
index c047f42552e1..d27740a80c5e 100644
@@ -1377,7 +1377,6 @@ asmlinkage __visible void __init xen_start_kernel(void)
 	if (!xen_initial_domain()) {
 		add_preferred_console("xenboot", 0, NULL);
 		add_preferred_console("tty", 0, NULL);
-		add_preferred_console("hvc", 0, NULL);
 		if (pci_xen)
 			x86_init.pci.arch_init = pci_xen_init;
 	} else {
@@ -1410,6 +1409,9 @@ asmlinkage __visible void __init xen_start_kernel(void)
 
 		xen_boot_params_init_edd();
 	}
+
+	add_preferred_console("hvc", 0, NULL);
+
 #ifdef CONFIG_PCI
 	/* PCI BIOS service won't work from a PV guest. */
 	pci_probe &= ~PCI_PROBE_BIOS;
Signature · 1 line
2.13.6
#1 lore raw

Hello Juergen,

arch/x86/xen/enlighten_pv.c

Quoted 10 lines · Juergen Gross

Today the hvc console is added as a preferred console for pv domUs only. As this requires a boot parameter for getting dom0 messages per default add it for dom0, too.

---
  arch/x86/xen/enlighten_pv.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
arch/x86/xen/enlighten_pv.c +0 -0

Is this something x86 specific? Could it be a generic approach?

Quoted 21 lines

index c047f42552e1..d27740a80c5e 100644

arch/x86/xen/enlighten_pv.c +3 -1
@@ -1377,7 +1377,6 @@ asmlinkage __visible void __init xen_start_kernel(void)
  	if (!xen_initial_domain()) {
  		add_preferred_console("xenboot", 0, NULL);
  		add_preferred_console("tty", 0, NULL);
-		add_preferred_console("hvc", 0, NULL);
  		if (pci_xen)
  			x86_init.pci.arch_init = pci_xen_init;
  	} else {
@@ -1410,6 +1409,9 @@ asmlinkage __visible void __init xen_start_kernel(void)
 
  		xen_boot_params_init_edd();
  	}
+
+	add_preferred_console("hvc", 0, NULL);
+
  #ifdef CONFIG_PCI
  	/* PCI BIOS service won't work from a PV guest. */
  	pci_probe &= ~PCI_PROBE_BIOS;
Signature · 1 line
*Andrii Anisov*
author maintainer
#2 lore raw
Quoted 8 lines · Andrii Anisov

Hello Juergen,

Quoted 4 lines · Juergen Gross

Today the hvc console is added as a preferred console for pv domUs only. As this requires a boot parameter for getting dom0 messages per default add it for dom0, too.

Quoted 7 lines

arch/x86/xen/enlighten_pv.c

Quoted 6 lines

---
  arch/x86/xen/enlighten_pv.c | 4 +++-

  1 file changed, 3 insertions(+), 1 deletion(-)
arch/x86/xen/enlighten_pv.c +0 -0

Is this something x86 specific? Could it be a generic approach?

In case ARM wants something similar I guess the test for xen_initial_domain() should be dropped in xen_early_init().

Stefano?

Juergen

#3 lore raw

Hi,

Quoted 14 lines · Juergen Gross
Quoted 13 lines · Andrii Anisov

Hello Juergen,

Quoted 9 lines · Juergen Gross

Today the hvc console is added as a preferred console for pv domUs only. As this requires a boot parameter for getting dom0 messages per default add it for dom0, too.

---
   arch/x86/xen/enlighten_pv.c | 4 +++-
   1 file changed, 3 insertions(+), 1 deletion(-)
Quoted 5 lines
Quoted 2 lines

arch/x86/xen/enlighten_pv.c

Quoted 1 line
arch/x86/xen/enlighten_pv.c +0 -0

Is this something x86 specific? Could it be a generic approach?

In case ARM wants something similar I guess the test for xen_initial_domain() should be dropped in xen_early_init().

I am pretty sure we discussed to remove !xen_initial_domain() for Arm in the past. But I don't remember why the patch was not sent to remove it.

Anyway, I guess this should be fine to have hvc as a preferred console for the initial domain as well.

Cheers,

Signature · 1 line
Julien Grall
#4 lore raw
Quoted 20 lines · Julien Grall

Hi,

Quoted 17 lines · Juergen Gross
Quoted 15 lines · Andrii Anisov

Hello Juergen,

arch/x86/xen/enlighten_pv.c

Quoted 10 lines · Juergen Gross

Today the hvc console is added as a preferred console for pv domUs only. As this requires a boot parameter for getting dom0 messages per default add it for dom0, too.

---
   arch/x86/xen/enlighten_pv.c | 4 +++-
   1 file changed, 3 insertions(+), 1 deletion(-)
arch/x86/xen/enlighten_pv.c +0 -0

Is this something x86 specific? Could it be a generic approach?

Quoted 7 lines
Quoted 2 lines

In case ARM wants something similar I guess the test for xen_initial_domain() should be dropped in xen_early_init().

I am pretty sure we discussed to remove !xen_initial_domain() for Arm in the past. But I don't remember why the patch was not sent to remove it.

Anyway, I guess this should be fine to have hvc as a preferred console for the initial domain as well.

Usually, Dom0 has access to several physical UARTs and/or VGA, making this patch less obviously desirable. I think that for Dom0 the best behavior would be to add "hvc0" as first console rather than last console, so that if the user specified something else, this call won't interfere with it.

#5 lore raw

Hi,

Quoted 26 lines · Stefano Stabellini
Quoted 25 lines · Julien Grall

Hi,

Quoted 14 lines · Juergen Gross
Quoted 13 lines · Andrii Anisov

Hello Juergen,

Quoted 9 lines · Juergen Gross

Today the hvc console is added as a preferred console for pv domUs only. As this requires a boot parameter for getting dom0 messages per default add it for dom0, too.

---
    arch/x86/xen/enlighten_pv.c | 4 +++-
    1 file changed, 3 insertions(+), 1 deletion(-)
Quoted 5 lines
Quoted 2 lines

arch/x86/xen/enlighten_pv.c

Quoted 1 line
arch/x86/xen/enlighten_pv.c +0 -0

Is this something x86 specific? Could it be a generic approach?

In case ARM wants something similar I guess the test for xen_initial_domain() should be dropped in xen_early_init().

I am pretty sure we discussed to remove !xen_initial_domain() for Arm in the past. But I don't remember why the patch was not sent to remove it.

Quoted 8 lines
Quoted 2 lines

Anyway, I guess this should be fine to have hvc as a preferred console for the initial domain as well.

Usually, Dom0 has access to several physical UARTs and/or VGA, making this patch less obviously desirable. I think that for Dom0 the best behavior would be to add "hvc0" as first console rather than last console, so that if the user specified something else, this call won't interfere with it.

Well, that's exactly the goal of add_preferred_console. It will use hvc0 unless specified otherwise by the user on the command line.

Cheers,

Signature · 1 line
Julien Grall
author maintainer
#6 lore raw
Quoted 35 lines · Julien Grall

Hi,

Quoted 32 lines · Stefano Stabellini
Quoted 30 lines · Julien Grall

Hi,

Quoted 14 lines · Juergen Gross
Quoted 13 lines · Andrii Anisov

Hello Juergen,

Quoted 9 lines · Juergen Gross

Today the hvc console is added as a preferred console for pv domUs only. As this requires a boot parameter for getting dom0 messages per default add it for dom0, too.

---
    arch/x86/xen/enlighten_pv.c | 4 +++-

    1 file changed, 3 insertions(+), 1 deletion(-)
Quoted 6 lines
Quoted 3 lines

arch/x86/xen/enlighten_pv.c

Quoted 2 lines
arch/x86/xen/enlighten_pv.c +0 -0

Is this something x86 specific? Could it be a generic approach?

In case ARM wants something similar I guess the test for xen_initial_domain() should be dropped in xen_early_init().

I am pretty sure we discussed to remove !xen_initial_domain() for Arm in the
past. But I don't remember why the patch was not sent to remove it.

Anyway, I guess this should be fine to have hvc as a preferred console for the
initial domain as well.

Quoted 8 lines
Quoted 5 lines

Usually, Dom0 has access to several physical UARTs and/or VGA, making this patch less obviously desirable. I think that for Dom0 the best behavior would be to add "hvc0" as first console rather than last console, so that if the user specified something else, this call won't interfere with it.

Well, that's exactly the goal of add_preferred_console. It will use hvc0 unless specified otherwise by the user on the command line.

I suggest someone who can test it should post a patch for ARM.

Juergen

author maintainer
#7 lore raw
In reply to Julien Grall
Quoted 35 lines · Julien Grall

Hi,

Quoted 32 lines · Stefano Stabellini
Quoted 30 lines · Julien Grall

Hi,

Quoted 14 lines · Juergen Gross
Quoted 13 lines · Andrii Anisov

Hello Juergen,

Quoted 9 lines · Juergen Gross

Today the hvc console is added as a preferred console for pv domUs only. As this requires a boot parameter for getting dom0 messages per default add it for dom0, too.

---
    arch/x86/xen/enlighten_pv.c | 4 +++-

    1 file changed, 3 insertions(+), 1 deletion(-)
Quoted 6 lines
Quoted 3 lines

arch/x86/xen/enlighten_pv.c

Quoted 2 lines
arch/x86/xen/enlighten_pv.c +0 -0

Is this something x86 specific? Could it be a generic approach?

In case ARM wants something similar I guess the test for xen_initial_domain() should be dropped in xen_early_init().

I am pretty sure we discussed to remove !xen_initial_domain() for Arm in the
past. But I don't remember why the patch was not sent to remove it.

Anyway, I guess this should be fine to have hvc as a preferred console for the
initial domain as well.

Quoted 8 lines
Quoted 5 lines

Usually, Dom0 has access to several physical UARTs and/or VGA, making this patch less obviously desirable. I think that for Dom0 the best behavior would be to add "hvc0" as first console rather than last console, so that if the user specified something else, this call won't interfere with it.

Well, that's exactly the goal of add_preferred_console. It will use hvc0 unless specified otherwise by the user on the command line.

I suggest someone who can test it should post a patch for ARM.

Juergen

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

#8 lore raw
In reply to Stefano Stabellini

Hi,

Quoted 26 lines · Stefano Stabellini
Quoted 25 lines · Julien Grall

Hi,

Quoted 14 lines · Juergen Gross
Quoted 13 lines · Andrii Anisov

Hello Juergen,

Quoted 9 lines · Juergen Gross

Today the hvc console is added as a preferred console for pv domUs only. As this requires a boot parameter for getting dom0 messages per default add it for dom0, too.

---
    arch/x86/xen/enlighten_pv.c | 4 +++-
    1 file changed, 3 insertions(+), 1 deletion(-)
Quoted 5 lines
Quoted 2 lines

arch/x86/xen/enlighten_pv.c

Quoted 1 line
arch/x86/xen/enlighten_pv.c +0 -0

Is this something x86 specific? Could it be a generic approach?

In case ARM wants something similar I guess the test for xen_initial_domain() should be dropped in xen_early_init().

I am pretty sure we discussed to remove !xen_initial_domain() for Arm in the past. But I don't remember why the patch was not sent to remove it.

Quoted 8 lines
Quoted 2 lines

Anyway, I guess this should be fine to have hvc as a preferred console for the initial domain as well.

Usually, Dom0 has access to several physical UARTs and/or VGA, making this patch less obviously desirable. I think that for Dom0 the best behavior would be to add "hvc0" as first console rather than last console, so that if the user specified something else, this call won't interfere with it.

Well, that's exactly the goal of add_preferred_console. It will use hvc0 unless specified otherwise by the user on the command line.

Cheers,

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#9 lore raw
In reply to Julien Grall
Quoted 20 lines · Julien Grall

Hi,

Quoted 17 lines · Juergen Gross
Quoted 15 lines · Andrii Anisov

Hello Juergen,

arch/x86/xen/enlighten_pv.c

Quoted 10 lines · Juergen Gross

Today the hvc console is added as a preferred console for pv domUs only. As this requires a boot parameter for getting dom0 messages per default add it for dom0, too.

---
   arch/x86/xen/enlighten_pv.c | 4 +++-
   1 file changed, 3 insertions(+), 1 deletion(-)
arch/x86/xen/enlighten_pv.c +0 -0

Is this something x86 specific? Could it be a generic approach?

Quoted 7 lines
Quoted 2 lines

In case ARM wants something similar I guess the test for xen_initial_domain() should be dropped in xen_early_init().

I am pretty sure we discussed to remove !xen_initial_domain() for Arm in the past. But I don't remember why the patch was not sent to remove it.

Anyway, I guess this should be fine to have hvc as a preferred console for the initial domain as well.

Usually, Dom0 has access to several physical UARTs and/or VGA, making this patch less obviously desirable. I think that for Dom0 the best behavior would be to add "hvc0" as first console rather than last console, so that if the user specified something else, this call won't interfere with it.

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

#10 lore raw
In reply to Juergen Gross

Hi,

Quoted 14 lines · Juergen Gross
Quoted 13 lines · Andrii Anisov

Hello Juergen,

Quoted 9 lines · Juergen Gross

Today the hvc console is added as a preferred console for pv domUs only. As this requires a boot parameter for getting dom0 messages per default add it for dom0, too.

---
   arch/x86/xen/enlighten_pv.c | 4 +++-
   1 file changed, 3 insertions(+), 1 deletion(-)
Quoted 5 lines
Quoted 2 lines

arch/x86/xen/enlighten_pv.c

Quoted 1 line
arch/x86/xen/enlighten_pv.c +0 -0

Is this something x86 specific? Could it be a generic approach?

In case ARM wants something similar I guess the test for xen_initial_domain() should be dropped in xen_early_init().

I am pretty sure we discussed to remove !xen_initial_domain() for Arm in the past. But I don't remember why the patch was not sent to remove it.

Anyway, I guess this should be fine to have hvc as a preferred console for the initial domain as well.

Cheers,

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
author maintainer
#11 lore raw
In reply to Andrii Anisov
Quoted 8 lines · Andrii Anisov

Hello Juergen,

Quoted 4 lines · Juergen Gross

Today the hvc console is added as a preferred console for pv domUs only. As this requires a boot parameter for getting dom0 messages per default add it for dom0, too.

Quoted 7 lines

arch/x86/xen/enlighten_pv.c

Quoted 6 lines

---
  arch/x86/xen/enlighten_pv.c | 4 +++-

  1 file changed, 3 insertions(+), 1 deletion(-)
arch/x86/xen/enlighten_pv.c +0 -0

Is this something x86 specific? Could it be a generic approach?

In case ARM wants something similar I guess the test for xen_initial_domain() should be dropped in xen_early_init().

Stefano?

Juergen

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

#12 lore raw
In reply to Juergen Gross

Hello Juergen,

arch/x86/xen/enlighten_pv.c

Quoted 10 lines · Juergen Gross

Today the hvc console is added as a preferred console for pv domUs only. As this requires a boot parameter for getting dom0 messages per default add it for dom0, too.

---
  arch/x86/xen/enlighten_pv.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
arch/x86/xen/enlighten_pv.c +0 -0

Is this something x86 specific? Could it be a generic approach?

Quoted 21 lines

index c047f42552e1..d27740a80c5e 100644

arch/x86/xen/enlighten_pv.c +3 -1
@@ -1377,7 +1377,6 @@ asmlinkage __visible void __init xen_start_kernel(void)
  	if (!xen_initial_domain()) {
  		add_preferred_console("xenboot", 0, NULL);
  		add_preferred_console("tty", 0, NULL);
-		add_preferred_console("hvc", 0, NULL);
  		if (pci_xen)
  			x86_init.pci.arch_init = pci_xen_init;
  	} else {
@@ -1410,6 +1409,9 @@ asmlinkage __visible void __init xen_start_kernel(void)
 
  		xen_boot_params_init_edd();
  	}
+
+	add_preferred_console("hvc", 0, NULL);
+
  #ifdef CONFIG_PCI
  	/* PCI BIOS service won't work from a PV guest. */
  	pci_probe &= ~PCI_PROBE_BIOS;
Signature · 8 lines
*Andrii Anisov*



_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#13 lore raw
In reply to Juergen Gross
Quoted 22 lines · Juergen Gross

Today the hvc console is added as a preferred console for pv domUs only. As this requires a boot parameter for getting dom0 messages per default add it for dom0, too.

---
 arch/x86/xen/enlighten_pv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/x86/xen/enlighten_pv.c +0 -1
index c047f42552e1..d27740a80c5e 100644
@@ -1377,7 +1377,6 @@ asmlinkage __visible void __init xen_start_kernel(void)
 	if (!xen_initial_domain()) {
 		add_preferred_console("xenboot", 0, NULL);
 		add_preferred_console("tty", 0, NULL);
-		add_preferred_console("hvc", 0, NULL);
 		if (pci_xen)
 			x86_init.pci.arch_init = pci_xen_init;
 	} else {

arch/x86/xen/enlighten_pv.c asmlinkage __visible void __init xen_start_kernel(void) · line 1414

Quoted 6 lines
arch/x86/xen/enlighten_pv.c +3 -0
@@ -1410,6 +1409,9 @@ asmlinkage __visible void __init xen_start_kernel(void)
 
 		xen_boot_params_init_edd();
 	}
+
+	add_preferred_console("hvc", 0, NULL);
+

Won't this prevent dom0 output from showing up on vga console by default?

-boris

Quoted 3 lines
arch/x86/xen/enlighten_pv.c +0 -0
 #ifdef CONFIG_PCI
 	/* PCI BIOS service won't work from a PV guest. */
 	pci_probe &= ~PCI_PROBE_BIOS;
author maintainer
#14 lore raw
Quoted 24 lines · Boris Ostrovsky
Quoted 23 lines · Juergen Gross

Today the hvc console is added as a preferred console for pv domUs only. As this requires a boot parameter for getting dom0 messages per default add it for dom0, too.

---
 arch/x86/xen/enlighten_pv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/x86/xen/enlighten_pv.c +0 -1
index c047f42552e1..d27740a80c5e 100644
@@ -1377,7 +1377,6 @@ asmlinkage __visible void __init xen_start_kernel(void)
 	if (!xen_initial_domain()) {
 		add_preferred_console("xenboot", 0, NULL);
 		add_preferred_console("tty", 0, NULL);
-		add_preferred_console("hvc", 0, NULL);
 		if (pci_xen)
 			x86_init.pci.arch_init = pci_xen_init;
 	} else {
@@ -1410,6 +1409,9 @@ asmlinkage __visible void __init xen_start_kernel(void)
 
Quoted 7 lines

arch/x86/xen/enlighten_pv.c asmlinkage __visible void __init xen_start_kernel(void) · line 1414

Quoted 5 lines
arch/x86/xen/enlighten_pv.c +3 -0
 		xen_boot_params_init_edd();
 	}
+
+	add_preferred_console("hvc", 0, NULL);
+

Won't this prevent dom0 output from showing up on vga console by default?

Right, we need to add "tty", too.

Will send V2.

Juergen

author maintainer
#15 lore raw
In reply to Boris Ostrovsky
Quoted 24 lines · Boris Ostrovsky
Quoted 23 lines · Juergen Gross

Today the hvc console is added as a preferred console for pv domUs only. As this requires a boot parameter for getting dom0 messages per default add it for dom0, too.

---
 arch/x86/xen/enlighten_pv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/x86/xen/enlighten_pv.c +0 -1
index c047f42552e1..d27740a80c5e 100644
@@ -1377,7 +1377,6 @@ asmlinkage __visible void __init xen_start_kernel(void)
 	if (!xen_initial_domain()) {
 		add_preferred_console("xenboot", 0, NULL);
 		add_preferred_console("tty", 0, NULL);
-		add_preferred_console("hvc", 0, NULL);
 		if (pci_xen)
 			x86_init.pci.arch_init = pci_xen_init;
 	} else {
@@ -1410,6 +1409,9 @@ asmlinkage __visible void __init xen_start_kernel(void)
 
Quoted 7 lines

arch/x86/xen/enlighten_pv.c asmlinkage __visible void __init xen_start_kernel(void) · line 1414

Quoted 5 lines
arch/x86/xen/enlighten_pv.c +3 -0
 		xen_boot_params_init_edd();
 	}
+
+	add_preferred_console("hvc", 0, NULL);
+

Won't this prevent dom0 output from showing up on vga console by default?

Right, we need to add "tty", too.

Will send V2.

Juergen

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

#16 lore raw
In reply to Juergen Gross
Quoted 22 lines · Juergen Gross

Today the hvc console is added as a preferred console for pv domUs only. As this requires a boot parameter for getting dom0 messages per default add it for dom0, too.

---
 arch/x86/xen/enlighten_pv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/x86/xen/enlighten_pv.c +0 -1
index c047f42552e1..d27740a80c5e 100644
@@ -1377,7 +1377,6 @@ asmlinkage __visible void __init xen_start_kernel(void)
 	if (!xen_initial_domain()) {
 		add_preferred_console("xenboot", 0, NULL);
 		add_preferred_console("tty", 0, NULL);
-		add_preferred_console("hvc", 0, NULL);
 		if (pci_xen)
 			x86_init.pci.arch_init = pci_xen_init;
 	} else {

arch/x86/xen/enlighten_pv.c asmlinkage __visible void __init xen_start_kernel(void) · line 1414

Quoted 6 lines
arch/x86/xen/enlighten_pv.c +3 -0
@@ -1410,6 +1409,9 @@ asmlinkage __visible void __init xen_start_kernel(void)
 
 		xen_boot_params_init_edd();
 	}
+
+	add_preferred_console("hvc", 0, NULL);
+

Won't this prevent dom0 output from showing up on vga console by default?

-boris

arch/x86/xen/enlighten_pv.c asmlinkage __visible void __init xen_start_kernel(void) · line 1417

Quoted 3 lines
arch/x86/xen/enlighten_pv.c +0 -0
 #ifdef CONFIG_PCI
 	/* PCI BIOS service won't work from a PV guest. */
 	pci_probe &= ~PCI_PROBE_BIOS;

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