From: "Jan Beulich" Subject: Re: [PATCH v8 1/3] xen/libxc: Allow changing max number of hypervisor cpuid leaves Date: Tue, 22 Apr 2014 13:41:30 +0100 Message-ID: <53567F9A020000780000AC42@nat28.tlf.novell.com> References: <1398117433-6428-1-git-send-email-boris.ostrovsky@oracle.com> <1398117433-6428-2-git-send-email-boris.ostrovsky@oracle.com> <53565673020000780000AA82@nat28.tlf.novell.com> <53566159.2090105@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53566159.2090105@oracle.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Boris Ostrovsky Cc: kevin.tian@intel.com, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, eddie.dong@intel.com, xen-devel@lists.xen.org, yang.z.zhang@intel.com, ian.jackson@eu.citrix.com List-Id: xen-devel@lists.xenproject.org >>> On 22.04.14 at 14:32, wrote: > On 04/22/2014 05:45 AM, Jan Beulich wrote: >>>>> On 21.04.14 at 23:57, wrote: >>> + if ( (limit < 2) || (limit > XEN_CPUID_MAX_NUM_LEAVES) ) >>> + limit = XEN_CPUID_MAX_NUM_LEAVES; >> Almost: If limit < 2, you would be better off using 2 rather than the >> default (which may be growing). > > My thinking was that for any invalid limit value we should ignore what > the user file specified, not try to guess what was meant. And I think that 0 or 1 aren't really invalid - if a lower limit is wanted, provided as low as possible one rather than ignoring the request (I didn't look at what upsets hvmloader - I suppose this could be fixed rather than going with the slightly awkward lower limit of 2). Jan