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

Re: [PATCH] xen/console: Handle true dom0less case when switching serial input


  • To: Michal Orzel <michal.orzel@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 15 Mar 2023 14:11:11 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cBwXD6E2Z8R894di53fgXpLAR/qTALMxrCUPujuCOEE=; b=BU5RzcbhBvP7udjygEz2ZTBS9RYX561bg6mUWdc8e2Qz5zm9eIxCsZ/8qFwb3gWUGX1HU4VIS4pXd/qzyWaWMn6fJp8y4dJHtUrVdflp/M5BeHfdnrNSBsq2Yol296XUHhxqQDzlYcbFK3DtszV7a7Suj8Rs/HbAL8oPLGqd63XDCumhv3xOLTqNxMbweWVspLBchUqQ1+uvamUOIm78UjNR5lznT8LTO1FMUze3msqS5GAJ1G4Q188stcMWY7cWzyYmr8B5i33jmdaUE1EDdQnaLXzkXmXr0q9kbhZk0X8PhrgDw83Y8/Gp0lq+5YLnSelLgcnh4Y8XybixRt9EuQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OkZjILPDxqeBgn1FtCBvaYvVGvoLzWy0IZy6QWJ+I7yG5gYXCtHODc0Nl2Hmi1u++Umf2BhugAIjBPSPryAqvbQIYLsKfzvIrRwFP9wTJAHZr0mygQmnf9KXhPKIwHE8plA/ywlQsRrZzBIm/jG89G/kuTKDeRf8p4VwhzY8v1WINRsTTGiCLER1tqIGt/nRTzPO0HHoFPX3isP8w5KIcIZH12ISW87vHqDHgS6z25hrGQ8v8E7UQQCVp6Cx/sO2/WbfQ/royeZfevLjMjRJoj8XgRdj7YjWk2+Y6Wj26JlMW5iZFGH9wunmfwhfEM/fzcJ8N8aybAxMRq+9ae/cOA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 15 Mar 2023 13:11:26 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 15.03.2023 13:34, Michal Orzel wrote:
> On 14/03/2023 16:17, Jan Beulich wrote:
>> On 14.03.2023 15:27, Michal Orzel wrote:
>>> --- a/xen/drivers/char/console.c
>>> +++ b/xen/drivers/char/console.c
>>> @@ -491,6 +491,14 @@ static void switch_serial_input(void)
>>>      else
>>>      {
>>>          console_rx++;
>>> +
>>> +        /*
>>> +         * Skip switching serial input to hardware domain if it does not 
>>> exist
>>> +         * (i.e. true dom0less mode).
>>> +         */
>>> +        if ( !hardware_domain && (console_rx == 1) )
>>> +            console_rx++;
>>
>> The consumers of this variable aren't really serialized with this
>> updating. That's probably okay-ish prior to your change, but now
>> there can be two updates in rapid succession. I think it would be
>> better if the variable was written only once here.
> ok, makes sense.
> 
>>
>>>          printk("*** Serial input to DOM%d", console_rx - 1);
>>
>> When invoked from console_endboot() this will now switch to Dom1,
>> i.e. that domain becomes kind of "preferred", which I think is
>> wrong. Instead I think in such a case we should direct input to
>> Xen by default.
> Switching serial input to the first usable domain is the major motivation 
> behind this patch.
> The number of times I got pinged by users with *apparent* Xen issue on true 
> dom0less
> just because input was directed to dom0 which was not there (not everyone 
> seems to read the
> boot logs) forced me to create this patch and manifests that this is not the 
> behavior user wants.
> Switching to Xen console would not help at all. Also, we already have a way 
> to set switch code to 'x'
> to default serial input to Xen.
> So I think what I did (switching to the first existing domain) should be the 
> default behavior (just like it was done for dom0).

Well, I'm not going to stand in the way, but if one of several supposedly
equal domains is to be "preferred" in some way, then I for one would
expect justification for doing so. If that's the route to go, then the
patch snippet you provided looks good to me.

Jan



 


Rackspace

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