From: Ian Jackson Subject: Re: [PATCH 2/4] libxl: vcpuset: Check max_vcpus argument against the maximum number of vCPUs the guest has set. Date: Tue, 3 Feb 2015 15:11:11 +0000 Message-ID: <21712.58639.482256.761520@mariner.uk.xensource.com> References: <1402045657.29759.34.camel@kazak.uk.xensource.com> <1422910069-15760-1-git-send-email-konrad.wilk@oracle.com> <1422910069-15760-3-git-send-email-konrad.wilk@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YIf8G-0003cY-Dg for xen-devel@lists.xenproject.org; Tue, 03 Feb 2015 15:11:16 +0000 In-Reply-To: <1422910069-15760-3-git-send-email-konrad.wilk@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk Cc: xen-devel@lists.xenproject.org, wei.liu2@citrix.com, Ian.Campbell@citrix.com List-Id: xen-devel@lists.xenproject.org Konrad Rzeszutek Wilk writes ("[PATCH 2/4] libxl: vcpuset: Check max_vcpus argument against the maximum number of vCPUs the guest has set."): > The maximum number of VCPUs the guest can have is determined during > domain creation and is set by 'maxvcpus' parameter (in the guest > config). Trying to set the amount of vCPUs above said value > in vcpuset will result in an error - and we can catch it here > (instead of later in the function) and print a nice warning to the user. ... > + rc = libxl_domain_info(ctx, &dominfo, domid); > + if (rc == ERROR_INVAL) { > + fprintf(stderr, "Error: Domain %u does not exist.\n", domid); > + return -rc; Do we really return ERROR_INVAL for this ? ... Looks like we do. OK then, although we are definitely going to have to change that at some point. How tiresome. Thanks, Ian.