lkml.org 
[lkml]   [2020]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] KVM: SVM: Add support for MPK feature on AMD
From
Date
On 5/6/20 3:02 PM, Babu Moger wrote:
> --- a/arch/x86/kvm/svm/svm.c
> +++ b/arch/x86/kvm/svm/svm.c
> @@ -818,6 +818,10 @@ static __init void svm_set_cpu_caps(void)
> if (boot_cpu_has(X86_FEATURE_LS_CFG_SSBD) ||
> boot_cpu_has(X86_FEATURE_AMD_SSBD))
> kvm_cpu_cap_set(X86_FEATURE_VIRT_SSBD);
> +
> + /* PKU is not yet implemented for shadow paging. */
> + if (npt_enabled && boot_cpu_has(X86_FEATURE_OSPKE))
> + kvm_cpu_cap_check_and_set(X86_FEATURE_PKU);
> }

Reviewed-by: Dave Hansen <dave.hansen@intel.com>

But, I'll also say that we probably shouldn't have put the other code
into arch/x86/kvm/vmx/vmx.c in the first place. It would be much nicer
if this refactored the current code into a common spot rather than
copying. But, I do understand the impulse to do it the way it was done.

\
 
 \ /
  Last update: 2020-05-07 00:37    [W:0.089 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site