From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Robert S. Phillips" Subject: [PATCH] - Hotkey to break hypervisor out of tight loop Date: Wed, 17 May 2006 09:54:02 -0400 Message-ID: <446B2AFA.6000408@virtualiron.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030707020606040906010707" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------030707020606040906010707 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit This patch provides a simple way to break out of a tight loop and bug: from the hypervisor monitor press ctrl-A, ctrl-A, ctrl-Z Signed-off-by: Robert S. Phillips (rphillips@virtualiron.com) --------------030707020606040906010707 Content-Type: text/plain; name="patch-9812-aaz" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-9812-aaz" # HG changeset patch # User rphillips@rphillips # Node ID ac69f504f7c1fd7415927f2c9ca460de70f71b53 # Parent f5480845f7080594723fe107e04fb4b9e4223b74 This patch provides a simple way to break out of a tight loop and bug: from the hypervisor monitor press ctrl-A, ctrl-A, ctrl-Z Signed-off-by: Robert S. Phillips (rphillips@virtualiron.com) diff -r f5480845f708 -r ac69f504f7c1 xen/drivers/char/console.c --- a/xen/drivers/char/console.c Tue May 16 11:47:06 2006 -0400 +++ b/xen/drivers/char/console.c Tue May 16 11:50:02 2006 -0400 @@ -310,6 +310,17 @@ return; } } +#ifndef NDEBUG + else if ( (SWITCH_CODE != 0) && (c == ('z' - 'a' + 1)) ) + { + /* To break out of tight hypervisor loops + * BUG on CTRL- CTRL- CTRL-z */ + if ( switch_code_count == 2 ) + BUG(); + else + switch_code_count = 0; + } +#endif else { switch_code_count = 0; --------------030707020606040906010707 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------030707020606040906010707--