]> xenbits.xensource.com Git - xen.git/commit
libxl: In libxl_set_vcpuonline check for maximum number of VCPUs against the cpumap.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 3 Apr 2015 20:02:29 +0000 (16:02 -0400)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 15 Apr 2015 13:04:09 +0000 (14:04 +0100)
commitd83bf9d224eeb5b73b93c2703f7dba4473cfa89c
tree099d093fc48e856445a762aaf036ff616925a061
parentb0e0f7270c8b0ede7d4051e21c09394fc35b5a36
libxl: In libxl_set_vcpuonline check for maximum number of VCPUs against the cpumap.

There is no sense in trying to online (or offline) CPUs when the size of
cpumap is greater than the maximum number of VCPUs the guest can go to.

As such fail the operation if the count of CPUs to online is greater
than what the guest started with. For the offline case we do not
check (as the bits are unset in the cpumap) and let it go through.

We coalesce some of the underlying libxl_set_vcpuonline code
together which was duplicated in QMP and XenStore codepaths.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl.c