From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Han, Huaitong" Subject: Re: [V3 PATCH 7/9] x86/hvm: pkeys, add pkeys support for guest_walk_tables Date: Fri, 11 Dec 2015 07:18:28 +0000 Message-ID: <1449818314.3868.37.camel@intel.com> References: <1449479780-19146-1-git-send-email-huaitong.han@intel.com> <1449479780-19146-8-git-send-email-huaitong.han@intel.com> <5669CB7F.8080206@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5669CB7F.8080206@citrix.com> Content-Language: en-US Content-ID: <80B07C00159A7B478F5AA212434A6B2C@intel.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: "george.dunlap@eu.citrix.com" , "ian.campbell@citrix.com" , "Dong, Eddie" , "andrew.cooper3@citrix.com" , "wei.liu2@citrix.com" , "ian.jackson@eu.citrix.com" , "Tian, Kevin" , "stefano.stabellini@eu.citrix.com" , "jbeulich@suse.com" , "Nakajima, Jun" , "keir@xen.org" Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Thu, 2015-12-10 at 18:59 +0000, Andrew Cooper wrote: > On 07/12/15 09:16, Huaitong Han wrote: > > + > > + /* PKRU dom0 is always zero */ > > + if ( likely(!pte_pkeys) ) > > + return 0; > > This is not an architectural restriction (as far as I can tell). Xen > must never make assumptions about how a guest chooses to use a > feature. Yes, I will remove the code section. On my test machine, writing non-zero value to PKRU domain 0 will lead to a GP fault, this is also conform to the usage scenario, and I will ask the intel architect the reason why SDM does not describe. If it is OK, I will send the other patch or new version patch to improve the efficiency of the code. > > ~Andrew