[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH V4 6/6] x86/hvm: pkeys, add pkeys support for cpuid handling



On Mon, 2015-12-21 at 08:07 -0700, Jan Beulich wrote:
> > > > On 21.12.15 at 08:21, <huaitong.han@xxxxxxxxx> 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.
> 
> > +        if ( (count == 0) && (*ecx &
> > cpufeat_mask(X86_FEATURE_PKU)) )
> > +            *ecx |= (v->arch.hvm_vcpu.guest_cr[4] & X86_CR4_PKE) ?
> > +                     cpufeat_mask(X86_FEATURE_OSPKE) : 0;
> 
> Also all (would now be 6!) count == 0 dependencies should be
> combined instead of repeating that condition so many times.
> 
> Jan
> 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.