* [PATCH][VT][12/15] When the guest shuts down a VM, make sure that the domain gets destroyed.
@ 2005-08-11 19:25 Arun Sharma
0 siblings, 0 replies; only message in thread
From: Arun Sharma @ 2005-08-11 19:25 UTC (permalink / raw)
To: Ian Pratt, Keir Fraser; +Cc: xen-devel
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@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
diff -r ac8cae1f2c47 -r 455dff354413 tools/ioemu/monitor.c
--- a/tools/ioemu/monitor.c Tue Aug 9 19:06:45 2005
+++ b/tools/ioemu/monitor.c Tue Aug 9 19:12:44 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 ac8cae1f2c47 -r 455dff354413 tools/ioemu/target-i386-dm/helper2.c
--- a/tools/ioemu/target-i386-dm/helper2.c Tue Aug 9 19:06:45 2005
+++ b/tools/ioemu/target-i386-dm/helper2.c Tue Aug 9 19:12:44 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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-08-11 19:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-11 19:25 [PATCH][VT][12/15] When the guest shuts down a VM, make sure that the domain gets destroyed Arun Sharma
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.