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

[PATCH] xen/console: do not drop serial output from the hardware domain


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Fri, 10 Jun 2022 17:06:51 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=wDxbl4piy7/vppSjjPgZ0j1j3gPTXxcYrvotx+cUcJA=; b=UJ5DmxGH50OD7boF956SJNrpZvaS/sMMzMIVE9ittV6ZFRG0uGX+MJJJ2vLvXTtxcVfsS5A/lYxjzYf1EfkJqzO9kQuPGjSbQqAlaFGPqTpqPjlDJrUBDPbCgunqFs+eZSZJVeaKUOq3H2QoEQqxR4O7u59ZniCDo+0fsm08z/W0zTefki/FHOwLkNRwOXhmwOiypb3aT+rQ5vwcI52Eh9JGqldhCclX0EITDBoPTc2gLJLVAyGPPRQlxtO0v3Z27mGK3FpVufiYqELzDyf5hu6bxB7R3QvWdYXa8axxGQ32yCLznlYPDPmspCSn7iKzCY7V+zbHcJMi/eQPEszi/A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eWaYAyPX9tWgaYTn6DEYlAzgsi4cKYfbuhgncKMqKuaR+a+0ARcuY8krHcBltd8sObP5GeeEljk5HxWQX5zFMkdyp2DvOyfyv3XNHQ4Kkf1Trs1x/V3uCFHrnAekAoDX6xZJJwMLIsArsgwCHla5gFl1gE0uQb6ASDOyUCOuCUn43DgOhAZvPXIyZuYlTJJ5j6UcnEHLU75bYwnJ1GSfKlvG4XkhsAa5sGJ5I1VErJQPfxotmcm2nxjCmgFRV0pNqCidK8lBUkRyRIpr7okvf60zfVvU9Seiicu6NzJ0UM9PeLsL8qepcElXeiYopFy0MvUfBjlsqPhVyZiKBOdpVQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Fri, 10 Jun 2022 15:07:23 +0000
  • Ironport-data: A9a23:5hSOHaIDBimjoqYoFE+RzZQlxSXFcZb7ZxGr2PjKsXjdYENS1DIGz DceW27SOK6KNjbzf9t/b4Wzp01Uu8XVm9IxSFRlqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokf0/0vrav67xZVF/fngqoDUUYYoAQgsA149IMsdoUg7wbRh3Ncw2YLR7z6l4 rseneWOYDdJ5BYsWo4kw/rrRMRH5amaVJsw5zTSVNgT1LPsvyB94KE3fMldG0DQUIhMdtNWc s6YpF2PEsE1yD92Yj+tuu6TnkTn2dc+NyDW4pZdc/DKbhSvOkXee0v0XRYRQR4/ttmHozx+4 NEStIeTRi54AqCWyP5Eehp2M3xXHKITrdcrIVDn2SCS52vvViK0ht9IUwQxN4Be/ftrC2ZT8 /BeMCoKch2Im+OxxvS8V/VogcMgasLsOevzuFk5lW2fUalgHsiFGv2RjTNb9G5YasRmB/HRa tBfcTNyRB/BfwdOKhEcD5dWcOKA2SKkKGMG+Qv9Sawf7UGJi1N8wZbRNfnqXIGAVcFXvUuKq TeTl4j+KlRAXDCF8hKV/3TpiuLRkCfTXIMJCKb+5vNsmEeUxGEYFFsRT1TTifuzh1O6WtlfA 1cJ4Sdopq83nGSpU938UhuQsHOC+BkGVLJ4CPYm4QuAzq7V5QexBWUeSDNFLts8u6ceWjgCx lKP2dTzClRSXKa9THuc8vKeq2y0MC1MdWsaP3ZcFk0C/sXpp5w1glTXVNF/HaWpj9rzXzbt3 zSNqyt4jLIW5SIW65iGEZn8q2rEjvD0osQdv207gkrNAttFWbOY
  • Ironport-hdrordr: A9a23:qcncgKk0cXzxlOk5sXrzR8tG1iXpDfPKimdD5ihNYBxZY6Wkfp +V8cjzhCWftN9OYhodcLC7V5Voj0msl6KdhrNhRYtKPTOWwVdASbsP0WKM+UyFJ8STzI5gPM RbAtVD4aPLfD9HZK/BiWHXcurIqOP3ipxA7t2uqkuFIzsaCJ2JuGxCe32m+wBNNX57LKt8MK DZyttMpjKmd3hSRsOnBkMdV+yGg9HQjprpbTMPGhZisWC1/HqVwY+/NyLd8gYVUjtJz7tn2W /Zkzbh7qHml/2g0BfT20La8pwTstr8zdloAtCKl6EuW0PRozftQL4kd6yJvTgzru3qwFE2kO PUqxNlBMh342O5RBDGnTLdny3blBo+4X7rzlGVxVH5p9bieT48A81dwapEbxrw8SMbzZxB+Z MO+1jcm4tcDBvGkii4zcPPTQtWmk29pmdnufIPjkZYTZAVZNZq3MYiFXtuYdg99R/Bmc4a+L EENrCc2B8WSyLQU5nhhBgi/DT2NU5DXitvQSA5y7+oOnZt7TNEJnAjtbMid0c7he4AoqZ/lp r529xT5ddzp+8tHNdA7bQ6ML+K4lKke2O8DEuiZXLaKYogB1Xh77bK3ZRd3pDbRHVP9up7pK j8
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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@xxxxxxxxxx>
---
 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




 


Rackspace

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