[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 13/14]: 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> # HG changeset patch # User Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx> # Date 1259597655 18000 # Node ID 0767f0bcfec197d2e4dbde58b36162308f349734 # Parent 5527664fbd0eeb423cb87d249fe74e5ab1321433 Enable turning on a different amount of vcpus than the maximum during domain creation/restore. Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx> diff -r 5527664fbd0e -r 0767f0bcfec1 libxl.h --- a/libxl.h +++ b/libxl.h @@ -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 5527664fbd0e -r 0767f0bcfec1 libxl_dom.c --- a/libxl_dom.c +++ b/libxl_dom.c @@ -89,7 +89,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-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |