[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] libxl: Use -vcpu_avail with qemu-xen.



On Mon, 3 Jun 2013, Ian Campbell wrote:
> 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...

Yes, I agree.


> > 
> > Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> > ---
> >  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));
> 
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.