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] add 5 sec delay before reboot when dom0 crashes

To: Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] add 5 sec delay before reboot when dom0 crashes
From: Chris Wright <chrisw@xxxxxxxxxxxx>
Date: Wed, 29 Mar 2006 13:34:38 -0800
Cc: Chris Wright <chrisw@xxxxxxxxxxxx>, Sean Dague <japh@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 29 Mar 2006 21:34:52 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <A95E2296287EAD4EB592B5DEEFCE0E9D4BA003@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <A95E2296287EAD4EB592B5DEEFCE0E9D4BA003@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
This will gives you time to read the panic message before the machine
reboots.  Similar behaviour to the 5 second pause when Xen crashes.

Signed-off-by: Chris Wright <chrisw@xxxxxxxxxxxx>
---

diff -r 50778f42f2dd xen/common/domain.c
--- a/xen/common/domain.c       Wed Mar 29 15:02:40 2006
+++ b/xen/common/domain.c       Wed Mar 29 13:35:03 2006
@@ -19,6 +19,7 @@
 #include <xen/rangeset.h>
 #include <xen/guest_access.h>
 #include <xen/hypercall.h>
+#include <xen/delay.h>
 #include <asm/debugger.h>
 #include <public/dom0_ops.h>
 #include <public/sched.h>
@@ -222,6 +223,12 @@
             printk("Domain 0 halted: halting machine.\n");
             machine_halt();
         }
+        else if ( reason == SHUTDOWN_crash)
+        {
+            printk("Domain 0 crashed: rebooting machine in 5 seconds.\n");
+            mdelay(5000);
+            machine_restart(0);
+        }
         else
         {
             printk("Domain 0 shutdown: rebooting machine.\n");

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>