All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Anthony PERARD <anthony.perard@citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@citrix.com>,
	Xen Devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] libxl: Use -vcpu_avail with qemu-xen.
Date: Mon, 3 Jun 2013 09:37:28 +0100	[thread overview]
Message-ID: <1370248648.404.5.camel@zakaz.uk.xensource.com> (raw)
In-Reply-To: <1370018361-14556-1-git-send-email-anthony.perard@citrix.com>

On Fri, 2013-05-31 at 17:39 +0100, Anthony PERARD wrote:
> 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.

Ugh. So how are we going to handle this in the future? libxl ideally
needs to work with upstream qemu or our qemu seamlessly, which would
mean needed to know whether to use -vcpu_avail vs. whatever upstream
has. I'd much prefer to make our qemu export the same interface and use
that...

> 
> 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));

  reply	other threads:[~2013-06-03  8:37 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 ` [PATCH] libxl: Use -vcpu_avail with qemu-xen Anthony PERARD
2013-06-03  8:37   ` Ian Campbell [this message]
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=1370248648.404.5.camel@zakaz.uk.xensource.com \
    --to=ian.campbell@citrix.com \
    --cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.