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/
Home Products Support Community News


[Xen-devel] [PATCH] Clear device-model information when destroying an HV

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] Clear device-model information when destroying an HVM domain with stubdom
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
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AQHLTaebDwEdpSd9wUa2LsqteyOExQ==
Thread-topic: [PATCH] Clear device-model information when destroying an HVM domain with stubdom

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", 
         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