aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/domctl.c
diff options
context:
space:
mode:
authorDario Faggioli <dario.faggioli@citrix.com>2013-04-17 10:57:32 +0000
committerIan Campbell <ian.campbell@citrix.com>2013-04-17 12:11:14 +0100
commitb5b79a12c41b5e76af9d47551027b56f210d9029 (patch)
tree05125acfb1348b09f63830577687a55f73d0b324 /xen/common/domctl.c
parentcfcc144ff1ce59a9f93a44bbc89d1e20f5011c3d (diff)
downloadxen-b5b79a12c41b5e76af9d47551027b56f210d9029.tar.gz
xen-b5b79a12c41b5e76af9d47551027b56f210d9029.tar.bz2
xen-b5b79a12c41b5e76af9d47551027b56f210d9029.zip
xen: allow for explicitly specifying node-affinity
Make it possible to pass the node-affinity of a domain to the hypervisor from the upper layers, instead of always being computed automatically. Note that this also required generalizing the Flask hooks for setting and getting the affinity, so that they now deal with both vcpu and node affinity. Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com> Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Juergen Gross <juergen.gross@ts.fujitsu.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/common/domctl.c')
-rw-r--r--xen/common/domctl.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/xen/common/domctl.c b/xen/common/domctl.c
index 37532c25c6..6bd8efdf06 100644
--- a/xen/common/domctl.c
+++ b/xen/common/domctl.c
@@ -560,6 +560,23 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl)
}
break;
+ case XEN_DOMCTL_setnodeaffinity:
+ {
+ nodemask_t new_affinity;
+
+ ret = xenctl_bitmap_to_nodemask(&new_affinity,
+ &op->u.nodeaffinity.nodemap);
+ if ( !ret )
+ ret = domain_set_node_affinity(d, &new_affinity);
+ }
+ break;
+ case XEN_DOMCTL_getnodeaffinity:
+ {
+ ret = nodemask_to_xenctl_bitmap(&op->u.nodeaffinity.nodemap,
+ &d->node_affinity);
+ }
+ break;
+
case XEN_DOMCTL_setvcpuaffinity:
case XEN_DOMCTL_getvcpuaffinity:
{