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

[Xen-devel] [PATCH] Clear device-model information when destroying an HVM domain with stubdom


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Jun Zhu (Intern)" <Jun.Zhu@xxxxxxxxxx>
  • Date: Mon, 6 Sep 2010 10:40:56 +0100
  • Accept-language: zh-CN, en-US
  • Acceptlanguage: zh-CN, en-US
  • Delivery-date: Mon, 06 Sep 2010 02:42:52 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AQHLTaebDwEdpSd9wUa2LsqteyOExQ==
  • Thread-topic: [PATCH] Clear device-model information when destroying an HVM domain with stubdom

Hi,

This patch clears the device-model information from xenstore when destroying an 
HVM domain with stubdom.

Signed-off-by: Jun Zhu <Jun.Zhu@xxxxxxxxxx>

diff -r 0d8541707371 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Mon Sep 06 09:58:16 2010 +0100
+++ b/tools/libxl/libxl.c       Mon Sep 06 10:37:29 2010 +0100
@@ -834,6 +834,8 @@
     char *pid;
     int ret;
 
+       xs_rm(ctx->xsh, XBT_NULL, libxl_sprintf(ctx, 
"/local/domain/0/device-model/%d", domid));
+
     pid = libxl_xs_read(ctx, XBT_NULL, libxl_sprintf(ctx, 
"/local/domain/%d/image/device-model-pid", domid));
     if (!pid) {
         int stubdomid = libxl_get_stubdom_id(ctx, domid);
@@ -844,7 +846,6 @@
         XL_LOG(ctx, XL_LOG_ERROR, "Device model is a stubdom, domid=%d\n", 
stubdomid);
         return libxl_domain_destroy(ctx, stubdomid, 0);
     }
-    xs_rm(ctx->xsh, XBT_NULL, libxl_sprintf(ctx, 
"/local/domain/0/device-model/%d", domid));
 
     ret = kill(atoi(pid), SIGHUP);
     if (ret < 0 && errno == ESRCH) {


Jun Zhu
Citrix Systems UK
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.