All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen/console: do not drop serial output from the hardware domain
@ 2022-06-10 15:06 Roger Pau Monne
  2022-06-13  7:30 ` Jan Beulich
  0 siblings, 1 reply; 20+ messages in thread
From: Roger Pau Monne @ 2022-06-10 15:06 UTC (permalink / raw)
  To: xen-devel
  Cc: Roger Pau Monne, Andrew Cooper, George Dunlap, Jan Beulich,
	Julien Grall, Stefano Stabellini, Wei Liu

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.pau@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



^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2022-06-22  9:59 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-10 15:06 [PATCH] xen/console: do not drop serial output from the hardware domain Roger Pau Monne
2022-06-13  7:30 ` Jan Beulich
2022-06-13  8:21   ` Roger Pau Monné
2022-06-13  8:29     ` Jan Beulich
2022-06-13  9:04       ` Roger Pau Monné
2022-06-13  9:18         ` Jan Beulich
2022-06-13 12:32           ` Roger Pau Monné
2022-06-13 13:56             ` Jan Beulich
2022-06-14  6:52               ` Roger Pau Monné
2022-06-14  8:10                 ` Jan Beulich
2022-06-14  8:32                   ` Roger Pau Monné
2022-06-14  8:41                     ` Roger Pau Monné
2022-06-14  9:13                     ` Jan Beulich
2022-06-14  9:38                       ` Roger Pau Monné
2022-06-14  9:45                         ` Jan Beulich
2022-06-16 11:31                           ` Roger Pau Monné
2022-06-22  8:04                             ` Jan Beulich
2022-06-22  9:09                               ` Roger Pau Monné
2022-06-22  9:33                                 ` Jan Beulich
2022-06-22  9:58                                   ` Roger Pau Monné

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.