[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 2/7] libxl: In libxl_set_vcpuonline check for maximum number of VCPUs against the cpumap.
On Mon, 2015-03-30 at 11:26 -0400, Konrad Rzeszutek Wilk wrote: > 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 underlaying libxl_set_vcpuonline code "underlying" > together to take advantage for the QMP and XenStore ways. > > Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> > [v2: constify the libxl_domain and handle libxl_domain_info error] > --- > tools/libxl/libxl.c | 70 > +++++++++++++++++++++++++++++++---------------------- > 1 file changed, 41 insertions(+), 29 deletions(-) > > diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c > index 80c7ff6..13a98fd 100644 > --- a/tools/libxl/libxl.c > +++ b/tools/libxl/libxl.c > @@ -5442,28 +5442,34 @@ int libxl_domain_get_nodeaffinity(libxl_ctx *ctx, > uint32_t domid, > return 0; > } > > +static int libxl__check_max(libxl__gc *gc, const libxl_dominfo *info, The name is so generic (max what?) and the implementation so simple I'd suggest to just inline the check at the one call site. Otherwise looks ok, thanks. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |