Skip to contentSkip to conversation

properly halt machine when dom0 crashed and reboot is disabled

PATCH New Jan Beulich 1 participant 1 message Jan 23, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 properly halt machine when dom0 crashed and reboot is disabled

Previously, only the processor the domain crash occurred on was halted; now all processors get stopped.

Jan

xen/arch/x86/domain.c renamed from home/jbeulich/src/xen/2006-01-20/xen/arch/x86/domain.c +15 -16
@@ -111,6 +111,20 @@ static inline void kb_wait(void)
             break;
 }
 
+void __attribute__((noreturn)) __machine_halt(void *unused)
+{
+    for ( ; ; )
+        safe_halt();
+}
+
+void machine_halt(void)
+{
+    watchdog_disable();
+    console_start_sync();
+    smp_call_function(__machine_halt, NULL, 1, 0);
+    __machine_halt(NULL);
+}
+
 void machine_restart(char * __unused)
 {
     int i;
@@ -118,8 +132,7 @@ void machine_restart(char * __unused)
     if ( opt_noreboot )
     {
         printk("Reboot disabled on cmdline: require manual reset\n");
-        for ( ; ; )
-            safe_halt();
+        machine_halt();
     }
 
     watchdog_disable();
@@ -164,20 +177,6 @@ void machine_restart(char * __unused)
 }
 
 
-void __attribute__((noreturn)) __machine_halt(void *unused)
-{
-    for ( ; ; )
-        safe_halt();
-}
-
-void machine_halt(void)
-{
-    watchdog_disable();
-    console_start_sync();
-    smp_call_function(__machine_halt, NULL, 1, 0);
-    __machine_halt(NULL);
-}
-
 void dump_pageframe_info(struct domain *d)
 {
     struct pfn_info *page;

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