[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [V2 PATCH 1/9] x86/hvm: pkeys, add pkeys support for cpuid handling
On Wed, 2015-12-02 at 04:06 -0700, Jan Beulich wrote: > > > ) > > > + *ecx &= ~cpufeat_mask(X86_FEATURE_PKU); > > > + > > > + if ( (count == 0) && cpu_has_pku ) > > > + *ecx |= (v->arch.hvm_vcpu.guest_cr[4] & X86_CR4_PKE) > > > ? > > > + cpufeat_mask(X86_FEATURE_OSPKE) : 0; > > > > This is still buggy. cpu_has_pku has no relevance to whether OSPKE > > becomes visible. > > > > Visibility of OSPKE is determined solely by v > > ->arch.hvm_vcpu.guest_cr[4] > > & X86_CR4_PKE and nothing else. > > Actually I wouldn't mind guarding against the case where the CR4 flag > is wrongly set for whatever reason, but that ought to check the PKU > bit in *ecx, not the host flag. Same applies to the cpu_has_xsave > check - this too should check the guest flag, not the host one. I will add guest_cpuid_has_xxx functions. > > Jan > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |