On Thu, May 11, 2023 at 12:08:44AM -0400, Yang Weijiang wrote:
Initialize kvm_caps.supported_xss with host XSS msr value AND XSS mask.do you mean kvm_caps.supported_xss by "the result"? I don't see how
KVM_SUPPORTED_XSS holds all potential supported feature bits,
the result
represents all KVM supported feature bits which is used for swapping guest
and host FPU contents.
fpu_swap_kvm_fpstate() uses kvm_caps.supported_xss.
Signed-off-by: Yang Weijiang <weijiang.yang@xxxxxxxxx>AMD has the same statement. Do you need to remove that one?
---
arch/x86/kvm/vmx/vmx.c | 1 -
arch/x86/kvm/x86.c | 6 +++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 44fb619803b8..c872a5aafa50 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -7806,7 +7806,6 @@ static __init void vmx_set_cpu_caps(void)
kvm_cpu_cap_set(X86_FEATURE_UMIP);
/* CPUID 0xD.1 */
- kvm_caps.supported_xss = 0;