[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] linux-2.6.18/xencons: generalize use of add_preferred_console()



>>> On 06.02.14 at 23:53, Olaf Hering <olaf@xxxxxxxxx> wrote:
> On Fri, Dec 13, Jan Beulich wrote:
> 
>> Changeset 762:a070228ac76e ("add hvc compatibility mode to xencons"
>> added this call just for the HVC case, without giving any reason why
>> HVC would be special in this regard. Use the call for all cases.
> 
>> +++ b/drivers/xen/console/console.c
>> @@ -236,6 +234,8 @@ static int __init xen_console_init(void)
>>  
>>      wbuf = alloc_bootmem(wbuf_size);
>>  
>> +    if (!is_initial_xendomain())
>> +            add_preferred_console(kcons_info.name, xc_num, NULL);
>>      register_console(&kcons_info);
> 
> Why is dom0 special in this case anyway? At least with SLE12, when Xen
> is booted with 'console=com1 com1=115200' and the kernel is booted
> without any console= or xencons=, kcons_info.index is still -1 and as a
> result xvc-1 is registered as name for xvc0. This confuses systemd
> because kernel name and console name do not match, so login via serial
> is not possible.

I have to direct this question to Ian, who wrote the original patch
(sorry Ian, I know it's been long ago), which the patch above only
generalizes.

> When add_preferred_console is called uncondtionally the login on serial
> works as expected.

They question is what the intended behavior here is: I'd generally
expect the lack of console= on the command line for Dom0 to
behave just like for a native kernel, which I don't think would show
a login prompt on other than the screen in that case. So maybe
instead of just dropping the is_initial_xendomain() we should make
console registration conditional upon a command line option having
requested its presence in the Dom0 case. (Looking at the command
line handling code I also wonder whether it isn't a mistake to set
console_use_vt even in the xencons=off case, and to not bail
upon the right side of the = not being recognized - see
196:52f308b17bae and 153:12c399692d44 for how this evolved.)

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.