Prevent dropping console output from the hardware domain, since it's likely important to have all the output if the boot fails without having to resort to sync_console (which also affects the output from other guests).
Do so by pairing the console_serial_puts() with serial_{start,end}_log_everything(), so that no output is dropped. Note that such calls are placed inside of a section already protected by the console_lock so there are no concurrent callers that could abuse of the setting of serial_start_log_everything(). Signed-off-by: Roger Pau Monné <roger....@citrix.com> --- xen/drivers/char/console.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c index f9937c5134..13207f4d88 100644 --- a/xen/drivers/char/console.c +++ b/xen/drivers/char/console.c @@ -614,7 +614,10 @@ static long guest_console_write(XEN_GUEST_HANDLE_PARAM(char) buffer, /* Use direct console output as it could be interactive */ spin_lock_irq(&console_lock); + serial_start_log_everything(sercon_handle); console_serial_puts(kbuf, kcount); + serial_end_log_everything(sercon_handle); + video_puts(kbuf, kcount); #ifdef CONFIG_X86 -- 2.36.1