tools/libxc: Introduce XC_CPUPOOL_POOLID_ANY
authorGeorge Dunlap <george.dunlap@citrix.com>
Wed, 15 Feb 2017 17:08:10 +0000 (17:08 +0000)
committerWei Liu <wei.liu2@citrix.com>
Thu, 16 Feb 2017 12:47:10 +0000 (12:47 +0000)
commitf5cfc3955ec1559ef7f9979dd7b98659d4be5e98
tree89e7da3359ea7d1534d8abdd552ee94df78a5ada
parentbc6a499ebcf102060987fb845c1450a38de441c7
tools/libxc: Introduce XC_CPUPOOL_POOLID_ANY

Callers to xc_cpupool_create() can either request a specific pool id,
or request that Xen do it for them.  But at the moment, the
"automatic" selection is indicated by using a magic value, 0.  This is
undesirable both because it doesn't obviously have meaning, but also
because '0' is a valid cpupool (albeit one which at the moment can't
be changed).

Introduce a constant, XC_CPUPOOL_POOLID_ANY, to indicate this instead.
Have it be the default for the python bindings.

Manually translate it, even though it's the same underlying value,
because we don't yet have a relaible way of enforcing that these
values are the same.

Signed-off-by: George Dunlap <george.dunlap@citrix.com>
Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxc/include/xenctrl.h
tools/libxc/xc_cpupool.c
tools/libxl/libxl_cpupool.c
tools/python/xen/lowlevel/xc/xc.c