From: Anthony PERARD <anthony.perard@citrix.com>
To: Xen Devel <xen-devel@lists.xen.org>
Cc: Anthony PERARD <anthony.perard@citrix.com>,
Stefano Stabellini <stefano.stabellini@citrix.com>
Subject: [PATCH] libxl: Use -vcpu_avail with qemu-xen.
Date: Fri, 31 May 2013 17:39:21 +0100 [thread overview]
Message-ID: <1370018361-14556-1-git-send-email-anthony.perard@citrix.com> (raw)
In-Reply-To: <1370017993-13437-1-git-send-email-anthony.perard@citrix.com>
This require the series CPU hotplug for qemu-xen.
Note: this patch is valid only for 4.3 as the -vcpu_avail will
probably not be upstream to Qemu.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
tools/libxl/libxl_dm.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index 1e3a9f4..2db2372 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -530,11 +530,17 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
flexarray_append(dm_args, "-smp");
if (b_info->avail_vcpus.size) {
int nr_set_cpus = 0;
+ char *s;
nr_set_cpus = libxl_bitmap_count_set(&b_info->avail_vcpus);
flexarray_append(dm_args, libxl__sprintf(gc, "%d,maxcpus=%d",
nr_set_cpus,
b_info->max_vcpus));
+
+ s = libxl_bitmap_to_hex_string(CTX, &b_info->avail_vcpus);
+ flexarray_vappend(dm_args, "-vcpu_avail",
+ libxl__sprintf(gc, "%s", s), NULL);
+ free(s);
} else
flexarray_append(dm_args, libxl__sprintf(gc, "%d",
b_info->max_vcpus));
--
Anthony PERARD
next prev parent reply other threads:[~2013-05-31 16:39 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-31 16:33 [PATCH 0/4] CPU hotplug port from qemu-traditionnal to qemu-xen for 4.3 Anthony PERARD
2013-05-31 16:33 ` [PATCH 1/4] HVM vcpu add/remove: qemu logic for vcpu add/revmoe Anthony PERARD
2013-05-31 21:19 ` Konrad Rzeszutek Wilk
2013-06-03 10:23 ` Stefano Stabellini
2013-05-31 16:33 ` [PATCH 2/4] Fix vcpu hotplug bug: get correct vcpu_avail bitmap Anthony PERARD
2013-05-31 16:33 ` [PATCH 3/4] Update vcpu hotplug logic Anthony PERARD
2013-05-31 21:16 ` Konrad Rzeszutek Wilk
2013-05-31 16:33 ` [PATCH 4/4] Implement 'xm vcpu-set' command for HVM guest Anthony PERARD
2013-05-31 21:14 ` Konrad Rzeszutek Wilk
2013-06-03 8:40 ` Ian Campbell
2013-06-03 10:24 ` Stefano Stabellini
2013-05-31 16:39 ` Anthony PERARD [this message]
2013-06-03 8:37 ` [PATCH] libxl: Use -vcpu_avail with qemu-xen Ian Campbell
2013-06-03 10:10 ` Stefano Stabellini
2013-06-03 13:49 ` Anthony PERARD
2013-05-31 17:20 ` [PATCH 0/4] CPU hotplug port from qemu-traditionnal to qemu-xen for 4.3 Anthony PERARD
2013-06-03 8:37 ` Ian Campbell
[not found] ` <51A8DA91.1080601@citrix.com>
2013-05-31 21:16 ` Konrad Rzeszutek Wilk
2013-06-03 8:41 ` Ian Campbell
2013-06-03 11:12 ` Anthony PERARD
2013-06-03 10:13 ` Stefano Stabellini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1370018361-14556-1-git-send-email-anthony.perard@citrix.com \
--to=anthony.perard@citrix.com \
--cc=stefano.stabellini@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).