diff --git a/src/domain_xl.c b/src/domain_xl.c index f7d164f..cd38820 100644 --- a/src/domain_xl.c +++ b/src/domain_xl.c @@ -44,6 +44,22 @@ #include "clickos.h" +/* + * This macro is taken from libvirt: https://gitlab.com/libvirt/libvirt/commit/bfc72e99920215c9b004a5380ca61fe6ff81ea6b + * + * 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 + #define CHK_ERRNO( call ) ({ \ int chk_errno = (call); \ if (chk_errno < 0) { \