Skip to contentSkip to conversation

- Hotkey to break hypervisor out of tight loop

PATCH New Robert S. Phillips 1 participant 1 message May 17, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 - Hotkey to break hypervisor out of tight loop

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

# 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

xen/drivers/char/console.c +11 -0
diff -r f5480845f708 -r ac69f504f7c1 xen/drivers/char/console.c
@@ -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-<switch char> CTRL-<switch char> CTRL-z */
+        if ( switch_code_count == 2 )
+            BUG();
+        else
+            switch_code_count = 0;
+    }
+#endif
     else
     {
         switch_code_count = 0;

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel