linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xen: use hvc console for dom0
@ 2018-02-26 11:08 Juergen Gross
  2018-02-26 12:06 ` [Xen-devel] " Andrii Anisov
  2018-02-26 19:02 ` Boris Ostrovsky
  0 siblings, 2 replies; 9+ messages in thread
From: Juergen Gross @ 2018-02-26 11:08 UTC (permalink / raw)
  To: linux-kernel, xen-devel; +Cc: boris.ostrovsky, jbeulich, 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.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 arch/x86/xen/enlighten_pv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c
index c047f42552e1..d27740a80c5e 100644
--- a/arch/x86/xen/enlighten_pv.c
+++ b/arch/x86/xen/enlighten_pv.c
@@ -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;
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [Xen-devel] [PATCH] xen: use hvc console for dom0
  2018-02-26 11:08 [PATCH] xen: use hvc console for dom0 Juergen Gross
@ 2018-02-26 12:06 ` Andrii Anisov
  2018-02-26 12:32   ` Juergen Gross
  2018-02-26 19:02 ` Boris Ostrovsky
  1 sibling, 1 reply; 9+ messages in thread
From: Andrii Anisov @ 2018-02-26 12:06 UTC (permalink / raw)
  To: Juergen Gross, linux-kernel, xen-devel; +Cc: boris.ostrovsky, jbeulich

Hello Juergen,


On 26.02.18 13:08, Juergen Gross wrote:
> 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.
>
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
>   arch/x86/xen/enlighten_pv.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c
Is this something x86 specific? Could it be a generic approach?

> index c047f42552e1..d27740a80c5e 100644
> --- a/arch/x86/xen/enlighten_pv.c
> +++ b/arch/x86/xen/enlighten_pv.c
> @@ -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;

-- 

*Andrii Anisov*

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Xen-devel] [PATCH] xen: use hvc console for dom0
  2018-02-26 12:06 ` [Xen-devel] " Andrii Anisov
@ 2018-02-26 12:32   ` Juergen Gross
  2018-02-27 11:14     ` Julien Grall
  0 siblings, 1 reply; 9+ messages in thread
From: Juergen Gross @ 2018-02-26 12:32 UTC (permalink / raw)
  To: Andrii Anisov, linux-kernel, xen-devel
  Cc: boris.ostrovsky, jbeulich, Stefano Stabellini

On 26/02/18 13:06, Andrii Anisov wrote:
> Hello Juergen,
> 
> 
> On 26.02.18 13:08, Juergen Gross wrote:
>> 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.
>>
>> Signed-off-by: Juergen Gross <jgross@suse.com>
>> ---
>>   arch/x86/xen/enlighten_pv.c | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c
> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] xen: use hvc console for dom0
  2018-02-26 11:08 [PATCH] xen: use hvc console for dom0 Juergen Gross
  2018-02-26 12:06 ` [Xen-devel] " Andrii Anisov
@ 2018-02-26 19:02 ` Boris Ostrovsky
  2018-02-27  9:26   ` Juergen Gross
  1 sibling, 1 reply; 9+ messages in thread
From: Boris Ostrovsky @ 2018-02-26 19:02 UTC (permalink / raw)
  To: Juergen Gross, linux-kernel, xen-devel; +Cc: jbeulich

On 02/26/2018 06:08 AM, Juergen Gross wrote:
> 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.
>
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
>  arch/x86/xen/enlighten_pv.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c
> index c047f42552e1..d27740a80c5e 100644
> --- a/arch/x86/xen/enlighten_pv.c
> +++ b/arch/x86/xen/enlighten_pv.c
> @@ -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);
> +

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

-boris

>  #ifdef CONFIG_PCI
>  	/* PCI BIOS service won't work from a PV guest. */
>  	pci_probe &= ~PCI_PROBE_BIOS;

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] xen: use hvc console for dom0
  2018-02-26 19:02 ` Boris Ostrovsky
@ 2018-02-27  9:26   ` Juergen Gross
  0 siblings, 0 replies; 9+ messages in thread
From: Juergen Gross @ 2018-02-27  9:26 UTC (permalink / raw)
  To: Boris Ostrovsky, linux-kernel, xen-devel; +Cc: jbeulich

On 26/02/18 20:02, Boris Ostrovsky wrote:
> On 02/26/2018 06:08 AM, Juergen Gross wrote:
>> 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.
>>
>> Signed-off-by: Juergen Gross <jgross@suse.com>
>> ---
>>  arch/x86/xen/enlighten_pv.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c
>> index c047f42552e1..d27740a80c5e 100644
>> --- a/arch/x86/xen/enlighten_pv.c
>> +++ b/arch/x86/xen/enlighten_pv.c
>> @@ -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);
>> +
> 
> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Xen-devel] [PATCH] xen: use hvc console for dom0
  2018-02-26 12:32   ` Juergen Gross
@ 2018-02-27 11:14     ` Julien Grall
  2018-02-27 20:03       ` Stefano Stabellini
  0 siblings, 1 reply; 9+ messages in thread
From: Julien Grall @ 2018-02-27 11:14 UTC (permalink / raw)
  To: Juergen Gross, Andrii Anisov, linux-kernel, xen-devel
  Cc: boris.ostrovsky, Stefano Stabellini, jbeulich

Hi,

On 26/02/18 12:32, Juergen Gross wrote:
> On 26/02/18 13:06, Andrii Anisov wrote:
>> Hello Juergen,
>>
>>
>> On 26.02.18 13:08, Juergen Gross wrote:
>>> 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.
>>>
>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>> ---
>>>    arch/x86/xen/enlighten_pv.c | 4 +++-
>>>    1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c
>> 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,

-- 
Julien Grall

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Xen-devel] [PATCH] xen: use hvc console for dom0
  2018-02-27 11:14     ` Julien Grall
@ 2018-02-27 20:03       ` Stefano Stabellini
  2018-02-27 20:09         ` Julien Grall
  0 siblings, 1 reply; 9+ messages in thread
From: Stefano Stabellini @ 2018-02-27 20:03 UTC (permalink / raw)
  To: Julien Grall
  Cc: Juergen Gross, Andrii Anisov, linux-kernel, xen-devel,
	boris.ostrovsky, Stefano Stabellini, jbeulich

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1433 bytes --]

On Tue, 27 Feb 2018, Julien Grall wrote:
> Hi,
> 
> On 26/02/18 12:32, Juergen Gross wrote:
> > On 26/02/18 13:06, Andrii Anisov wrote:
> > > Hello Juergen,
> > > 
> > > 
> > > On 26.02.18 13:08, Juergen Gross wrote:
> > > > 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.
> > > > 
> > > > Signed-off-by: Juergen Gross <jgross@suse.com>
> > > > ---
> > > >    arch/x86/xen/enlighten_pv.c | 4 +++-
> > > >    1 file changed, 3 insertions(+), 1 deletion(-)
> > > > 
> > > > diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c
> > > 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.

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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Xen-devel] [PATCH] xen: use hvc console for dom0
  2018-02-27 20:03       ` Stefano Stabellini
@ 2018-02-27 20:09         ` Julien Grall
  2018-03-02 14:21           ` Juergen Gross
  0 siblings, 1 reply; 9+ messages in thread
From: Julien Grall @ 2018-02-27 20:09 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: nd, Juergen Gross, Andrii Anisov, linux-kernel, xen-devel,
	boris.ostrovsky, jbeulich

Hi,

On 27/02/2018 20:03, Stefano Stabellini wrote:
> On Tue, 27 Feb 2018, Julien Grall wrote:
>> Hi,
>>
>> On 26/02/18 12:32, Juergen Gross wrote:
>>> On 26/02/18 13:06, Andrii Anisov wrote:
>>>> Hello Juergen,
>>>>
>>>>
>>>> On 26.02.18 13:08, Juergen Gross wrote:
>>>>> 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.
>>>>>
>>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>>>> ---
>>>>>     arch/x86/xen/enlighten_pv.c | 4 +++-
>>>>>     1 file changed, 3 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c
>>>> 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.
> 
> 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,

-- 
Julien Grall

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Xen-devel] [PATCH] xen: use hvc console for dom0
  2018-02-27 20:09         ` Julien Grall
@ 2018-03-02 14:21           ` Juergen Gross
  0 siblings, 0 replies; 9+ messages in thread
From: Juergen Gross @ 2018-03-02 14:21 UTC (permalink / raw)
  To: Julien Grall, Stefano Stabellini
  Cc: nd, Andrii Anisov, linux-kernel, xen-devel, boris.ostrovsky, jbeulich

On 27/02/18 21:09, Julien Grall wrote:
> Hi,
> 
> On 27/02/2018 20:03, Stefano Stabellini wrote:
>> On Tue, 27 Feb 2018, Julien Grall wrote:
>>> Hi,
>>>
>>> On 26/02/18 12:32, Juergen Gross wrote:
>>>> On 26/02/18 13:06, Andrii Anisov wrote:
>>>>> Hello Juergen,
>>>>>
>>>>>
>>>>> On 26.02.18 13:08, Juergen Gross wrote:
>>>>>> 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.
>>>>>>
>>>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>>>>> ---
>>>>>>     arch/x86/xen/enlighten_pv.c | 4 +++-
>>>>>>     1 file changed, 3 insertions(+), 1 deletion(-)
>>>>>>
>>>>>> diff --git a/arch/x86/xen/enlighten_pv.c
>>>>>> b/arch/x86/xen/enlighten_pv.c
>>>>> 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.
>>
>> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-03-02 14:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-26 11:08 [PATCH] xen: use hvc console for dom0 Juergen Gross
2018-02-26 12:06 ` [Xen-devel] " Andrii Anisov
2018-02-26 12:32   ` Juergen Gross
2018-02-27 11:14     ` Julien Grall
2018-02-27 20:03       ` Stefano Stabellini
2018-02-27 20:09         ` Julien Grall
2018-03-02 14:21           ` Juergen Gross
2018-02-26 19:02 ` Boris Ostrovsky
2018-02-27  9:26   ` Juergen Gross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).