|  |  | 
  
    |  |  | 
 
  |   |  | 
  
    |  |  | 
  
    |  |  | 
  
    |   xen-devel
[Xen-devel] [PATCH] console.c - add ^A^A^Z handler 
| 
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 <=
 |  |  | 
  
    |  |  |