From: "Jan Beulich" Subject: Re: [PATCH v6 1/4] xen/libxc: Allow changing max number of hypervisor cpuid leaves Date: Fri, 21 Mar 2014 15:15:14 +0000 Message-ID: <532C578202000078000AF429@nat28.tlf.novell.com> References: <1395373911-4268-1-git-send-email-boris.ostrovsky@oracle.com> <1395373911-4268-2-git-send-email-boris.ostrovsky@oracle.com> <532C288D02000078001267A1@nat28.tlf.novell.com> <532C5710.7070007@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <532C5710.7070007@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: keir@xen.org, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, eddie.dong@intel.com, xen-devel@lists.xen.org, jun.nakajima@intel.com, yang.z.zhang@intel.com, ian.jackson@eu.citrix.com List-Id: xen-devel@lists.xenproject.org >>> On 21.03.14 at 16:13, Boris Ostrovsky wrote: > On 03/21/2014 06:54 AM, Jan Beulich wrote: >>>>> On 21.03.14 at 04:51, Boris Ostrovsky wrote: >>> - /* >>> - * Some Solaris PV drivers fail if max > base + 2. Help them out by >>> - * hiding the PVRDTSCP leaf if PVRDTSCP is disabled. >>> - */ >>> - limit = (d->arch.tsc_mode < TSC_MODE_PVRDTSCP) ? 2 : 3; >>> + /* Number of leaves may be user-specified */ >>> + domain_cpuid(d, base, 0, &limit, &dummy, &dummy, &dummy); >>> + limit &= 0xff; >>> + if ( (limit < 2) || (limit > 3) ) >> So all of the sudden you also enforce a lower limit? That doesn't >> seem to belong here (and at a first glance it doesn't seem to be >> right either). >> >> There are two things you want enforce >> - limit never becoming zero due to user override (at once taking >> care of the no override case) > > You think not having leaf 1 is something we should allow? I can see why > 2 perhaps may be omitted. If we force the lower limit that can be asked for to 1, leaf 1 will always be visible. Jan