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: enables less than maximum vc

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxenlight: enables less than maximum vcpus
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 01 Dec 2009 06:30:42 -0800
Delivery-date: Tue, 01 Dec 2009 06:34:08 -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 1259675373 0
# Node ID c01e324ef514b0c83649b0cc0393ffe3d506bfda
# Parent  72ad0f6bb3b61497d75d0ef71f8e422f4ce1826c
libxenlight: enables less than maximum vcpus

Enable turning on a different amount of vcpus than
the maximum during domain creation/restore.

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

diff -r 72ad0f6bb3b6 -r c01e324ef514 tools/libxl/libxl.h
--- a/tools/libxl/libxl.h       Tue Dec 01 13:48:48 2009 +0000
+++ b/tools/libxl/libxl.h       Tue Dec 01 13:49:33 2009 +0000
@@ -64,6 +64,7 @@ typedef struct {
     int hpet;
     int vpt_align;
     int max_vcpus;
+    int cur_vcpus;
     uint32_t max_memkb;
     uint32_t video_memkb;
     uint32_t shadow_memkb;
diff -r 72ad0f6bb3b6 -r c01e324ef514 tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c   Tue Dec 01 13:48:48 2009 +0000
+++ b/tools/libxl/libxl_dom.c   Tue Dec 01 13:49:33 2009 +0000
@@ -88,7 +88,8 @@ int build_post(struct libxl_ctx *ctx, ui
     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";
+        ents[10+(i*2)+1] = (i && info->cur_vcpus && (i >= info->cur_vcpus))
+                            ? "offline" : "online";
     }
 
     dom_path = libxl_xs_get_dompath(ctx, domid);

_______________________________________________
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: enables less than maximum vcpus, Xen patchbot-unstable <=