Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed an issue with libxl_set_vcpuaffinity() on newer xen versions #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/domain_xl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) { \
Expand Down