[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230817181820.15315-9-john.allen@amd.com>
Date: Thu, 17 Aug 2023 18:18:20 +0000
From: John Allen <john.allen@....com>
To: <kvm@...r.kernel.org>
CC: <linux-kernel@...r.kernel.org>, <pbonzini@...hat.com>,
<weijiang.yang@...el.com>, <rick.p.edgecombe@...el.com>,
<seanjc@...gle.com>, <x86@...nel.org>, <thomas.lendacky@....com>,
<bp@...en8.de>, John Allen <john.allen@....com>
Subject: [RFC PATCH v3 8/8] KVM: SVM: Add CET features to supported_xss
If the CPU supports CET, add CET XSAVES feature bits to the
supported_xss mask.
Signed-off-by: John Allen <john.allen@....com>
---
v2:
- Remove curly braces around if statement
---
arch/x86/kvm/svm/svm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
index 683bf18b965d..685f8715a716 100644
--- a/arch/x86/kvm/svm/svm.c
+++ b/arch/x86/kvm/svm/svm.c
@@ -5105,6 +5105,10 @@ 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))
+ kvm_caps.supported_xss |= XFEATURE_MASK_CET_USER |
+ XFEATURE_MASK_CET_KERNEL;
+
if (enable_pmu) {
/*
* Enumerate support for PERFCTR_CORE if and only if KVM has
--
2.39.1
Powered by blists - more mailing lists