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] [xen-unstable] libxenlight: write vcpu availability path

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxenlight: write vcpu availability paths in xenstore
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 01 Dec 2009 06:30:40 -0800
Delivery-date: Tue, 01 Dec 2009 06:31:57 -0800
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1259675283 0
# Node ID d4157fe48f196a920b5c7975673ae031ca32088e
# Parent  4260d8edf2603f08a367e8335978efdfc174aab2
libxenlight: write vcpu availability paths in xenstore

Write cpu availability paths to xenstore. Otherwise,
no vcpus other than the first are enabled.

Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
---
 tools/libxl/libxl_dom.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff -r 4260d8edf260 -r d4157fe48f19 tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c   Tue Dec 01 13:47:18 2009 +0000
+++ b/tools/libxl/libxl_dom.c   Tue Dec 01 13:48:03 2009 +0000
@@ -73,8 +73,9 @@ int build_post(struct libxl_ctx *ctx, ui
     char *dom_path, *vm_path;
     xs_transaction_t t;
     char **ents;
-
-    ents = libxl_calloc(ctx, 10 * 2, sizeof(char *));
+    int i;
+
+    ents = libxl_calloc(ctx, (10 + info->max_vcpus) * 2, sizeof(char *));
     ents[0] = "memory/static-max";
     ents[1] = libxl_sprintf(ctx, "%d", info->max_memkb);
     ents[2] = "memory/target";
@@ -85,6 +86,10 @@ int build_post(struct libxl_ctx *ctx, ui
     ents[7] = libxl_sprintf(ctx, "%"PRIu32, state->store_port);
     ents[8] = "store/ring-ref";
     ents[9] = libxl_sprintf(ctx, "%lu", state->store_mfn);
+    for (i = 0; i < info->max_vcpus; i++) {
+        ents[10+(i*2)]   = libxl_sprintf(ctx, "cpu/%d/availability", i);
+        ents[10+(i*2)+1] = "online";
+    }
 
     dom_path = libxl_xs_get_dompath(ctx, domid);
     if (!dom_path)
@@ -103,6 +108,8 @@ retry_transaction:
             goto retry_transaction;
     xs_introduce_domain(ctx->xsh, domid, state->store_mfn, state->store_port);
     free(vm_path);
+    libxl_free(ctx, ents);
+    libxl_free(ctx, dom_path);
     return 0;
 }
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxenlight: write vcpu availability paths in xenstore, Xen patchbot-unstable <=