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

Re: [Xen-devel] [PATCH] libxl: don't break the build on Xen>=4.5 because of libxl_vcpu_setaffinity()



Dario Faggioli wrote:
> libxl interface for vcpu pinning is changing in Xen 4.5. Basically,
> libxl_set_vcpuaffinity() now wants one more parameter. That is
> representative of 'VCPU soft affinity', which libvirt does not use.
>
> To mark such change, the macro LIBXL_HAVE_VCPUINFO_SOFT_AFFINITY is
> defined. Use it as a gate and, if present, re-#define the calls from
> the old to the new interface, to avoid breaking the build.
>   

Thanks, looks good.  I was about to push, but wanted to check with other
libvirt devs first since we are in 1.2.6 freeze.  Would it be fine to
push this?  It fixes a libxl driver build failure against xen-unstable.

Regards,
Jim

> Signed-off-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
> Cc: Jim Fehlig <jfehlig@xxxxxxxx>
> Cc: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
> Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
> ---
>  src/libxl/libxl_conf.h |   11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/src/libxl/libxl_conf.h b/src/libxl/libxl_conf.h
> index 6aa36d2..da66b4e 100644
> --- a/src/libxl/libxl_conf.h
> +++ b/src/libxl/libxl_conf.h
> @@ -55,6 +55,17 @@
>  # define LIBXL_DUMP_DIR LIBXL_LIB_DIR "/dump"
>  # define LIBXL_BOOTLOADER_PATH BINDIR "/pygrub"
>  
> +/* libxl interface for setting VCPU affinity changed in 4.5. In fact, a new
> + * parameter has been added, representative of 'VCPU soft affinity'. If one
> + * does not care about it (and that's libvirt case), passing NULL is the
> + * right thing to do. To mark that change, LIBXL_HAVE_VCPUINFO_SOFT_AFFINITY
> + * is defined. */
> +# ifdef LIBXL_HAVE_VCPUINFO_SOFT_AFFINITY
> +#  define libxl_set_vcpuaffinity(ctx, domid, vcpuid, map) \
> +    libxl_set_vcpuaffinity((ctx), (domid), (vcpuid), (map), NULL)
> +#  define libxl_set_vcpuaffinity_all(ctx, domid, max_vcpus, map) \
> +    libxl_set_vcpuaffinity_all((ctx), (domid), (max_vcpus), (map), NULL)
> +# endif
>  
>  typedef struct _libxlDriverPrivate libxlDriverPrivate;
>  typedef libxlDriverPrivate *libxlDriverPrivatePtr;
>
>
>
>   

_______________________________________________
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®.