From: "Jan Beulich" Subject: [PATCH] properly halt machine when dom0 crashed and reboot is disabled Date: Mon, 23 Jan 2006 14:45:18 +0100 Message-ID: <43D4EBFE.76F0.0078.0@novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__PartDCFE46FE.0__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__PartDCFE46FE.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Previously, only the processor the domain crash occurred on was halted; now all processors get stopped. Jan --=__PartDCFE46FE.0__= Content-Type: text/plain; name="xen-x86-machine_halt.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="xen-x86-machine_halt.patch" --- /home/jbeulich/src/xen/2006-01-20/xen/arch/x86/domain.c 2006-01-20 13:23:29.000000000 +0100 +++ 2006-01-20/xen/arch/x86/domain.c 2006-01-20 15:15:23.000000000 +0100 @@ -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; --=__PartDCFE46FE.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__PartDCFE46FE.0__=--