[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y9B9Ey1hK9A7NDVb@google.com>
Date: Wed, 25 Jan 2023 00:51:31 +0000
From: Sean Christopherson <seanjc@...gle.com>
To: John Allen <john.allen@....com>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
pbonzini@...hat.com, weijiang.yang@...el.com,
rick.p.edgecombe@...el.com, x86@...nel.org, thomas.lendacky@....com
Subject: Re: [RFC PATCH 7/7] KVM: SVM: Add CET features to supported_xss
On Wed, Oct 12, 2022, John Allen wrote:
> If the CPU supports CET, add CET XSAVES feature bits to the
> supported_xss mask.
>
> Signed-off-by: John Allen <john.allen@....com>
> ---
> arch/x86/kvm/svm/svm.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
> index b474c7e57139..b815865ad0fb 100644
> --- a/arch/x86/kvm/svm/svm.c
> +++ b/arch/x86/kvm/svm/svm.c
> @@ -5026,6 +5026,11 @@ static __init void svm_set_cpu_caps(void)
> boot_cpu_has(X86_FEATURE_AMD_SSBD))
> kvm_cpu_cap_set(X86_FEATURE_VIRT_SSBD);
>
> + if (kvm_cpu_cap_has(X86_FEATURE_SHSTK)) {
No need for curly braces.
> + kvm_caps.supported_xss |= XFEATURE_MASK_CET_USER |
> + XFEATURE_MASK_CET_KERNEL;
> + }
> +
> /* AMD PMU PERFCTR_CORE CPUID */
> if (enable_pmu && boot_cpu_has(X86_FEATURE_PERFCTR_CORE))
> kvm_cpu_cap_set(X86_FEATURE_PERFCTR_CORE);
> --
> 2.34.3
>
Powered by blists - more mailing lists