From: "Jan Beulich" Subject: Re: [PATCH] xc_cpuid_x86.c: No need to mask NX twice Date: Fri, 05 Sep 2014 17:09:41 +0100 Message-ID: <5409FC650200007800031931@mail.emea.novell.com> References: <1409911893-18037-1-git-send-email-alfred.z.song@gmail.com> <5409AD6E0200007800031618@mail.emea.novell.com> <5409E07D020000780003182B@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: 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: z Cc: Ian Campbell , Stefano Stabellini , jinsong.liu@alibaba-inc.com, ian.jackson@eu.citrix.com, Zhuo Song , boyu.mt@alibaba-inc.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 05.09.14 at 17:45, wrote: > Hi, Jan > > I am sorry for making you confused. > > What I mean is there seems to be some redundant work. For example, to leaf > 0x80000001, the generic work (masking NX and PSE36) has been overwritten by > the the vendor's functions (amd_xc_cpuid_policy and intel_xc_cpuid_policy) > , why couldn't we just drop them and leave the work to the vendor? Of > cause, another way is just like you said, keeping the generic ones, and > changing the logic in the vendor-based implementation. > > What I want to do is to simplify this if possible. :) Right, yet conceptually anything that is defined by the architecture would better be done in the generic routine. Anything that is truly vendor specific should be done in the vendor ones. And the dependency of NX on PAE is (nowadays) an architectural one. Jan