]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
libxc: allow empty memory nodes in vNUMA
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Fri, 14 Aug 2015 16:18:52 +0000 (12:18 -0400)
committerIan Campbell <ian.campbell@citrix.com>
Sun, 16 Aug 2015 06:49:59 +0000 (07:49 +0100)
The test for 'nr_vmemranges < nr_vnodes' in xc_domain_setvnuma() was
originally writtten with the idea that number of memory ranges would
at least be equal to number of nodes.

We may want to specify nodes with no memory, however, and thus this
check should be removed.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxc/xc_domain.c

index 2ee26fb7853c8f29210adbf0a9424f29fc4225e0..780797f084337bc919bb22a5345463b9ce9ee23d 100644 (file)
@@ -2451,8 +2451,7 @@ int xc_domain_setvnuma(xc_interface *xch,
                              XC_HYPERCALL_BUFFER_BOUNCE_BOTH);
     errno = EINVAL;
 
-    if ( nr_vnodes == 0 || nr_vmemranges == 0 ||
-         nr_vmemranges < nr_vnodes || nr_vcpus == 0 )
+    if ( nr_vnodes == 0 || nr_vmemranges == 0 || nr_vcpus == 0 )
         return -1;
 
     if ( !vdistance || !vcpu_to_vnode || !vmemrange || !vnode_to_pnode )