Messages in this thread | | | Date | Wed, 30 Mar 2022 21:30:07 +0000 | From | Sean Christopherson <> | Subject | Re: [PATCH v6 6/7] KVM: VMX: Expose PKS to guest |
| |
On Mon, Feb 21, 2022, Chenyi Qiang wrote: > @@ -7454,6 +7455,13 @@ static __init void vmx_set_cpu_caps(void) > > if (cpu_has_vmx_waitpkg()) > kvm_cpu_cap_check_and_set(X86_FEATURE_WAITPKG); > + > + /* > + * If not support VM_{ENTRY, EXIT}_LOAD_IA32_PKRS, > + * don't expose the PKS as well. > + */
I wouldn't bother with the comment, this pattern is common and the behavior is self-explanatory.
> + if (cpu_has_load_ia32_pkrs()) > + kvm_cpu_cap_check_and_set(X86_FEATURE_PKS); > }
| |