sched: DOMCTL_*vcpuaffinity works with hard and soft affinity
authorDario Faggioli <dario.faggioli@citrix.com>
Mon, 16 Jun 2014 10:13:25 +0000 (12:13 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 16 Jun 2014 10:13:25 +0000 (12:13 +0200)
commit6e4ecc6d5884b816ed6eb1949561fdfb85acd179
tree1b0d06279d16b7a5834af74b0a0c00bce5d8fe4f
parentbf508bd2fb83b51f8547d1969629e05b6b87d1c5
sched: DOMCTL_*vcpuaffinity works with hard and soft affinity

by adding a flag for the caller to specify which one he cares about.

At the same time, enable the caller to get back the "effective affinity"
of the vCPU. That is the intersection between cpupool's cpus, the (new)
hard affinity and, for soft affinity, the (new) soft affinity. In fact,
despite what has been successfully set with the DOMCTL_setvcpuaffinity
hypercall, the Xen scheduler will never run a vCPU outside of its hard
affinity or of its domain's cpupool.

This happens by adding another cpumap to the interface and making both
the cpumaps IN/OUT parameters (for DOMCTL_setvcpuaffinity, they're of
course out-only for DOMCTL_getvcpuaffinity).

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxc/xc_domain.c
xen/arch/x86/traps.c
xen/common/domctl.c
xen/common/schedule.c
xen/common/wait.c
xen/include/public/domctl.h
xen/include/xen/sched.h