On 16/11/2015 08:51, Huaitong Han wrote:
> This patch disables CPUID:PKU without ept.

The commit message and probably the code too should say why.

Paolo

> Signed-off-by: Huaitong Han <huaitong....@intel.com>
> 
> diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
> index ece687b..e1113ae 100644
> --- a/arch/x86/kvm/cpuid.c
> +++ b/arch/x86/kvm/cpuid.c
> @@ -447,6 +447,8 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 
> *entry, u32 function,
>                       entry->ebx |= F(TSC_ADJUST);
>                       entry->ecx &= kvm_supported_word11_x86_features;
>                       cpuid_mask(&entry->ecx, 13);
> +                     if (!tdp_enabled)
> +                             entry->ecx &= ~F(PKU);
>               } else {
>                       entry->ebx = 0;
>                       entry->ecx = 0;
> 
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to