On 05.12.2025 00:32, Grygorii Strashko wrote: > From: Grygorii Strashko <[email protected]> > > 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 <[email protected]> > --- > 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? Jan
