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-changelog

[Xen-changelog] When the guest shuts down a VM, make sure that the domai

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] When the guest shuts down a VM, make sure that the domain gets destroyed.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 11 Aug 2005 17:06:14 -0400
Delivery-date: Thu, 11 Aug 2005 21:07:16 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 3f1f7cf07369ffdcbc2c884f3db58c926549bffc
# Parent  ee8df88e5f7ef84be24a889b8883fa9426797611
When the guest shuts down a VM, make sure that the domain gets destroyed.

Device model needs to do xm destroy before it exits on
guest shutdown/poweroff/halt -p.

Signed-off-by: Edwin Zhai <edwin.zhai@xxxxxxxxx>
Signed-off-by: Arun Sharma <arun.sharma@xxxxxxxxx>

diff -r ee8df88e5f7e -r 3f1f7cf07369 tools/ioemu/monitor.c
--- a/tools/ioemu/monitor.c     Thu Aug 11 21:05:58 2005
+++ b/tools/ioemu/monitor.c     Thu Aug 11 21:06:15 2005
@@ -225,14 +225,10 @@
     }
 }
 
+extern void destroy_vmx_domain(void);
 static void do_quit(void)
 {
-    extern int domid;
-    extern FILE* logfile;
-    char destroy_cmd[20];
-    sprintf(destroy_cmd, "xm destroy %d", domid);
-    if (system(destroy_cmd) == -1)
-        fprintf(logfile, "%s failed.!\n", destroy_cmd);
+    destroy_vmx_domain();
     exit(0);
 }
 
diff -r ee8df88e5f7e -r 3f1f7cf07369 tools/ioemu/target-i386-dm/helper2.c
--- a/tools/ioemu/target-i386-dm/helper2.c      Thu Aug 11 21:05:58 2005
+++ b/tools/ioemu/target-i386-dm/helper2.c      Thu Aug 11 21:06:15 2005
@@ -328,7 +328,16 @@
        env->send_event = 1;
 }
 
-//static unsigned long tsc_per_tick = 1; /* XXX: calibrate */
+void
+destroy_vmx_domain(void)
+{
+    extern int domid;
+    extern FILE* logfile;
+    char destroy_cmd[20];
+    sprintf(destroy_cmd, "xm destroy %d", domid);
+    if (system(destroy_cmd) == -1)
+        fprintf(logfile, "%s failed.!\n", destroy_cmd);
+}
 
 int main_loop(void)
 {
@@ -396,6 +405,7 @@
                        }
                }
        }
+        destroy_vmx_domain();
        return 0;
 }
 

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

<Prev in Thread] Current Thread [Next in Thread>