WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] console.c - add ^A^A^Z handler

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] console.c - add ^A^A^Z handler
From: Ben Thomas <bthomas@xxxxxxxxxxxxxxx>
Date: Thu, 02 Nov 2006 16:32:36 -0500
Delivery-date: Thu, 02 Nov 2006 13:33:03 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.8-1.1.fc4 (X11/20060501)
There are times when it is nice to know what is happening within
the hypervisor.  Unfortunately, a non-null set of these times also
include the unfortunate circumstances in which the normal hypervisor
keypress handler might not respond.  Add a bit of code to allow
^a^a^z to generate a BUG. This has proven to be very useful in
these almost-completely-hung situations.  (This is really
<SWITCH_CODE><SWITCH_CODE>^z, but you knew that.)

Signed-off-by: Robert Phillips (rphillips@xxxxxxxxxxxxxxx)

--
------------------------------------------------------------------------
Ben Thomas                                         Virtual Iron Software
bthomas@xxxxxxxxxxxxxxx                            Tower 1, Floor 2
978-849-1214                                       900 Chelmsford Street
                                                   Lowell, MA 01851
# There are times, when it is nice to know what is happening within
# the hypervisor.  Unfortunately, a non-null set of these times also
# include the unforunate circumstances in which the normal hypervisor
# keypress handler might not respond.  Add a bit of code to allow
# ^A^A^Z to generate a bug.  Technically, this is really
# <SWITCH_CODE><SWITCH_CODE>^z, but you get the idea.

Signed-off-by: Robert Phillips (rphillips@xxxxxxxxxxxxxxx)

Index: xen-unstable.hg/xen/drivers/char/console.c
===================================================================
--- xen-unstable.hg.orig/xen/drivers/char/console.c     2006-11-01 
15:24:29.000000000 -0500
+++ xen-unstable.hg/xen/drivers/char/console.c  2006-11-01 15:24:34.000000000 
-0500
@@ -222,6 +222,15 @@
             return;
         }
     }
+    else if ( (SWITCH_CODE != 0) && (c == ('z' - 'a' + 1)) )
+    {
+        /* To break out of tight hypervisor loops
+         * BUG on CTRL-<switch char> CTRL-<switch char> CTRL-z */
+        if ( switch_code_count == 2 )
+            BUG();
+        else
+            switch_code_count = 0;
+    }
     else
     {
         switch_code_count = 0;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] console.c - add ^A^A^Z handler, Ben Thomas <=