From: "Jan Beulich" Subject: Re: [PATCH v2 1/2] xc_cpuid_x86.c: Simplify masking conditions and remove redundant work Date: Tue, 09 Sep 2014 14:23:16 +0100 Message-ID: <540F1B640200007800032AF7@mail.emea.novell.com> References: <1410237112-21177-1-git-send-email-alfred.z.song@gmail.com> <540EF66C0200007800032929@mail.emea.novell.com> <1410265317.8217.151.camel@kazak.uk.xensource.com> <540EF29F.9000501@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <540EF29F.9000501@citrix.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: Andrew Cooper , Ian Campbell Cc: stefano.stabellini@eu.citrix.com, jinsong.liu@alibaba-inc.com, ian.jackson@eu.citrix.com, Zhuo Song , Zhuo Song , boyu.mt@alibaba-inc.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 09.09.14 at 14:29, wrote: > On Intel, syscall is strictly only available in long mode, being an AMD > instruction mandated in the 64bit spec. > > is_64bit is disappearing as Xen is unconditionally 64bit these days, but > preventing the guest using PAE will preclude it being able to enter long > mode. > > I would agree that it is not necessarily obvious, and based on this > consideration, I think it would be better to keep the variable > "is_64bit" as it is more informative than "is_pae" in the contexts used. Or drop the conditional, as suggested before. After all I don't think Intel CPUs advertise the bit in CPUID only when in long mode. Plus even if they did, what we do (did) here still wouldn't match their behavior (since is_64bit really is a hypervisor property, not a guest one). I.e. at the tools level we should leave the flag as is. And if indeed CPUID output changes when entering long mode (didn't check the spec), this could only be mimicked in hypervisor code anyway. Jan