>>> On 21.12.15 at 08:21, <huaitong....@intel.com> 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.

> +        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@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to