Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/xen/i386 Terminate the domain on RB_HALT, not just ...



details:   https://anonhg.NetBSD.org/src/rev/9348ab21028c
branches:  trunk
changeset: 572035:9348ab21028c
user:      tls <tls%NetBSD.org@localhost>
date:      Tue Dec 14 18:07:42 2004 +0000

description:
Terminate the domain on RB_HALT, not just on reboot.  This avoids looping
around a cngetc() that will never return while "halted", which is rude,
and which also requires domain 0 to not just restart us, but kill us
first.  Suggestion from Michael Kukat (though this change is not the
same as the one he suggested).

Will cngetc() actually return something when running in domain 0 with a
VGA console?  I don't think it will; if it actually does, we should make
this behaviour depend on whether we're in domain 0 or some other domain.

diffstat:

 sys/arch/xen/i386/machdep.c |  15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diffs (47 lines):

diff -r 5d925fc8dae6 -r 9348ab21028c sys/arch/xen/i386/machdep.c
--- a/sys/arch/xen/i386/machdep.c       Tue Dec 14 17:13:56 2004 +0000
+++ b/sys/arch/xen/i386/machdep.c       Tue Dec 14 18:07:42 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.10 2004/12/10 18:53:43 christos Exp $    */
+/*     $NetBSD: machdep.c,v 1.11 2004/12/14 18:07:42 tls Exp $ */
 /*     NetBSD: machdep.c,v 1.552 2004/03/24 15:34:49 atatat Exp        */
 
 /*-
@@ -73,7 +73,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.10 2004/12/10 18:53:43 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.11 2004/12/14 18:07:42 tls Exp $");
 
 #include "opt_beep.h"
 #include "opt_compat_ibcs2.h"
@@ -847,12 +847,14 @@
                 */
 #endif
        }
-
+#if 0
        if (howto & RB_HALT) {
+#endif
                printf("\n");
-               printf("The operating system has halted.\n");
-               printf("Please press any key to reboot.\n\n");
+               printf("The guest operating system has halted.\n");
+               printf("To reboot, recreate this Xen domain.\n\n");
 
+#if 0
 #ifdef BEEP_ONHALT
                {
                        int c;
@@ -877,8 +879,9 @@
        }
 
        printf("rebooting...\n");
+#endif
        if (cpureset_delay > 0)
-               delay(cpureset_delay * 1000);
+               delay(cpureset_delay * 1000);   /* XXX not nice under Xen! */
        cpu_reset();
        for(;;) ;
        /*NOTREACHED*/



Home | Main Index | Thread Index | Old Index