From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Han, Huaitong" Subject: Re: [PATCH V4 6/6] x86/hvm: pkeys, add pkeys support for cpuid handling Date: Tue, 22 Dec 2015 09:25:45 +0000 Message-ID: <1450776352.4024.19.camel@intel.com> References: <1450682504-32286-1-git-send-email-huaitong.han@intel.com> <1450682504-32286-7-git-send-email-huaitong.han@intel.com> <567823CE02000078000C1F87@prv-mh.provo.novell.com> <1450752885.4024.4.camel@intel.com> <5679182F02000078000C21F9@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5679182F02000078000C21F9@prv-mh.provo.novell.com> Content-Language: en-US Content-ID: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "JBeulich@suse.com" Cc: "Tian, Kevin" , "wei.liu2@citrix.com" , "ian.campbell@citrix.com" , "stefano.stabellini@eu.citrix.com" , "george.dunlap@eu.citrix.com" , "andrew.cooper3@citrix.com" , "ian.jackson@eu.citrix.com" , "xen-devel@lists.xen.org" , "Nakajima, Jun" , "keir@xen.org" List-Id: xen-devel@lists.xenproject.org On Tue, 2015-12-22 at 01:30 -0700, Jan Beulich wrote: > > > > On 22.12.15 at 03:54, wrote: > > On Mon, 2015-12-21 at 08:07 -0700, Jan Beulich wrote: > > > > > > On 21.12.15 at 08:21, wrote: > > > > @@ -4600,6 +4600,14 @@ void hvm_cpuid(unsigned int input, > > > > unsigned > > > > int *eax, unsigned int *ebx, > > > > /* Don't expose INVPCID to non-hap hvm. */ > > > > if ( (count == 0) && !hap_enabled(d) ) > > > > *ebx &= ~cpufeat_mask(X86_FEATURE_INVPCID); > > > > + > > > > + /* X86_FEATURE_PKU is not yet implemented for shadow > > > > paging. */ > > > > + if ( (count == 0) && !hap_enabled(d) ) > > > > + *ecx &= ~cpufeat_mask(X86_FEATURE_PKU); > > > > > > I'm still missing the xsave dependency here. > > Xsave dependency deletion becasue we use RDPKRU to get PKRU > > register > > value instead of XSAVE now. > > What the hypervisor does doesn't matter here. The question is > whether from an architectural standpoint XSAVE is a prerequsite. > If it is, then you need to clear PKU when _guest_ XSAVE is clear. No, XSAVE is not a prerequsite. > > Jan >