[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxenlight: enables less than maximum vcpus
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |