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

[Xen-devel] [PATCH] - 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

Signed-off-by: Robert S. Phillips (rphillips@xxxxxxxxxxxxxxx)
# 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@xxxxxxxxxxxxxxx)

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-<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
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

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