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][VT][7/15] Support rebooting VMX domains

To: Ian Pratt <Ian.Pratt@xxxxxxxxxxxx>, Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH][VT][7/15] Support rebooting VMX domains
From: Arun Sharma <arun.sharma@xxxxxxxxx>
Date: Thu, 11 Aug 2005 12:24:23 -0700
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 11 Aug 2005 19:26:22 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.1i
Support rebooting VMX domains

Signed-off-by: Ke Yu <ke.yu@xxxxxxxxx>
Signed-off-by: Arun Sharma <arun.sharma@xxxxxxxxx>

diff -r 4f2364097bd4 -r 6fb4a79e9f7a tools/ioemu/target-i386-dm/helper2.c
--- a/tools/ioemu/target-i386-dm/helper2.c      Tue Aug  9 19:06:44 2005
+++ b/tools/ioemu/target-i386-dm/helper2.c      Tue Aug  9 19:06:44 2005
@@ -55,6 +55,7 @@
 #include "vl.h"
 
 shared_iopage_t *shared_page = NULL;
+extern int reset_requested;
 
 CPUX86State *cpu_86_init(void)
 {
@@ -349,6 +350,10 @@
                     if (shutdown_requested) {
                         break;
                     }
+                    if (reset_requested){
+                        qemu_system_reset();
+                        reset_requested = 0;
+                    }
                 }
 
                /* Wait up to one seconds. */
@@ -394,13 +399,26 @@
        return 0;
 }
 
+static void
+qemu_vmx_reset(void *unused)
+{
+    char cmd[255];
+    extern int domid;
+
+    /* pause domain first, to avoid repeated reboot request*/ 
+    xc_domain_pause (xc_handle, domid);
+
+    sprintf(cmd,"xm shutdown -R %d", domid);
+    system (cmd);
+}
+
 CPUState *
 cpu_init()
 {
        CPUX86State *env;
       
         cpu_exec_init();
-
+        qemu_register_reset(qemu_vmx_reset, NULL);
        env = malloc(sizeof(CPUX86State));
        if (!env)
                return NULL;
@@ -427,3 +445,4 @@
 
        return env;
 }
+
diff -r 4f2364097bd4 -r 6fb4a79e9f7a tools/ioemu/vl.c
--- a/tools/ioemu/vl.c  Tue Aug  9 19:06:44 2005
+++ b/tools/ioemu/vl.c  Tue Aug  9 19:06:44 2005
@@ -2030,7 +2030,7 @@
 } QEMUResetEntry;
 
 static QEMUResetEntry *first_reset_entry;
-static int reset_requested;
+int reset_requested;
 int shutdown_requested;
 
 void qemu_register_reset(QEMUResetHandler *func, void *opaque)
diff -r 4f2364097bd4 -r 6fb4a79e9f7a tools/ioemu/vl.h
--- a/tools/ioemu/vl.h  Tue Aug  9 19:06:44 2005
+++ b/tools/ioemu/vl.h  Tue Aug  9 19:06:44 2005
@@ -107,6 +107,7 @@
 
 void qemu_register_reset(QEMUResetHandler *func, void *opaque);
 void qemu_system_reset_request(void);
+void qemu_system_reset(void);
 void qemu_system_shutdown_request(void);
 
 void main_loop_wait(int timeout);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH][VT][7/15] Support rebooting VMX domains, Arun Sharma <=