direct-io.hg

changeset 9473:a4acdf920c27

Xen waits 5 seconds to reboot when domain 0 crashes, giving
time to read crash messages.

From: Chris Wright <chrisw@sous-sol.org>

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Mar 30 00:07:23 2006 +0100 (2006-03-30)
parents c7020299facc
children 9239f190736d
files xen/common/domain.c
line diff
     1.1 --- a/xen/common/domain.c	Wed Mar 29 18:46:51 2006 +0100
     1.2 +++ b/xen/common/domain.c	Thu Mar 30 00:07:23 2006 +0100
     1.3 @@ -19,6 +19,7 @@
     1.4  #include <xen/rangeset.h>
     1.5  #include <xen/guest_access.h>
     1.6  #include <xen/hypercall.h>
     1.7 +#include <xen/delay.h>
     1.8  #include <asm/debugger.h>
     1.9  #include <public/dom0_ops.h>
    1.10  #include <public/sched.h>
    1.11 @@ -222,6 +223,13 @@ void domain_shutdown(struct domain *d, u
    1.12              printk("Domain 0 halted: halting machine.\n");
    1.13              machine_halt();
    1.14          }
    1.15 +        else if ( reason == SHUTDOWN_crash )
    1.16 +        {
    1.17 +            printk("Domain 0 crashed: rebooting machine in 5 seconds.\n");
    1.18 +            watchdog_disable();
    1.19 +            mdelay(5000);
    1.20 +            machine_restart(0);
    1.21 +        }
    1.22          else
    1.23          {
    1.24              printk("Domain 0 shutdown: rebooting machine.\n");