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

Re: [XEN][PATCH] console/consoleio: account for xen serial input focus during write


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
  • Date: Fri, 5 Dec 2025 10:04:05 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=F3BsiN4L6fNRoWyz+H/uQp4LH3rqAy8hTd6o00L3zMc=; b=MEJitEL+od8gGEUhbl/KUigjy6sYhKdv1eczqk66DBDyLYdiAI1dt1D03AGKkUAQaQII64aWcQ4H2wLruMwM03Tuh0ksv/3eQqCsmChkiyoNW1FcWqPpXf8jHd8P+aD7BJCAAQQK6pVNlDpKPwRsYMBLnbWYMlP4Vaa6LvZsY+iFdfoqchp/R2Mhmfzu95Xo1iQk7wfKYdt0GJZcEUh0XUuL9MEMk6MQW2LkdMuxIcKz1ElCYKKi5gCwcT7CdyD9c3DMgoAUdBbwvDVLuJ/RdEbgBq9A/MXMH85zhcO8qu+tlFjCfIP/ISYfmjS80l68RATj8DQmUwGlXPKUtH/LEg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pfbN/jLcT4sDh8vVC6de2D3RTcL1TCN1McSfg46AAk/wVth6iMv0FlyM5WpoIfg430RpST5saXgGCalcEJkyg2ZsUDOyVsJqCwb70RTPgS5+9eSpHRIGiF9j+zAr+YMm4rQWx91EQJNAqLwbRokTJ6twqcW0BC+e0Qt3BGsSQd3IyqjpQVKMOdjg/bybRUVzH/EENjvP9wjbEMVXasiIAn7/O7/r1FQqUUu6t2DRlDw1AxUcGgmB5CU9NlGjNa7416uxtXKEAmJfXSJaQScpeLQpYJgSd4FCNhZB635lf74n/MI5taaZI1IfCRDQfgLUz37B7tReRLEBwRXKUQcvPQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Jason Andryuk <jason.andryuk@xxxxxxx>, Victor Lira <victorm.lira@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 05 Dec 2025 08:04:19 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>



On 05.12.25 09:39, Jan Beulich wrote:
On 05.12.2025 00:32, Grygorii Strashko wrote:
From: Grygorii Strashko <grygorii_strashko@xxxxxxxx>

When 2 or more domains are created and:
- one is hwdom with "hvc0" (console_io) console
- other DomUs with vpl011 or "hvc0" (console_io) console
console output from hwdom may mix with output from other domains.

Example:
[    2.288816] Key type id_legacy registered
[    2.291894] n(XEN) DOM1: [    1.016950] DMA: preallocated 128 KiB 
GFP_KERNEL|GFP_DMA32 pool for atomic allocations
fs4filelayout_init: NFSv4 File Layout Driver Registering...
(XEN) DOM1: [    1.018846] audit: initializing netlink subsys (disabled)

This happens because for hwdom the console output is produced by domain and
handled by Xen as stream of chars, which can be interrupted when hwdom is
scheduled out and so, cause console output mix.
The Xen consoleio code trying to mimic serial HW behavior for hwdom
unconditionally by sending available data to serial HW on arrival.
Xen consoleio code does not account for Xen console input focus, comparing
to emulated serial hw, like vpl011, which does the same for domain with
active Xen console input focus only.

Switching console input focus to Xen improves situation, but not enough.

This patch changes consoleio code to account for domain with active Xen
console input focus - console output will be sent directly to serial HW
only if domain has active Xen console input focus. For other domains -
console output will be buffered and sync on per-line basis.

Example output:
(d2) [    4.263417] Key type id_legacy registered
(XEN) DOM1: [    4.658080] Advanced Linux Sound Architecture Driver Initialized.
(d2) [    4.277824] nfs4filelayout_init: NFSv4 File Layout Driver Registering...

Signed-off-by: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
---
This causes random multi-domain tests failures due to inter-domain console
mixing which breaks console parsing checks.

This remark reads as if "here's a patch, but it breaks things". Instead of
merely "This", did you maybe mean "The original behavior" or some such?

Right.

"
The original behavior causes random multi-domain tests failures due to 
inter-domain console
mixing which breaks console parsing checks.
"

--
Best regards,
-grygorii




 


Rackspace

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