On Thu, May 11, 2023, Yang Weijiang wrote:OK, will change it in next version.
From: Sean Christopherson <sean.j.christopherson@xxxxxxxxx>Can you change this to "xstate_msrs"?
Load the guest's FPU state if userspace is accessing MSRs whose values are
managed by XSAVES. Two MSR access helpers, i.e., kvm_{get,set}_xsave_msr(),
are introduced by a later patch to facilitate access to this kind of MSRs.
[...]
#define KVM_X86_OP(func) \
@@ -4336,6 +4339,21 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
}
EXPORT_SYMBOL_GPL(kvm_get_msr_common);
+static const u32 xsave_msrs[] = {
Make sense, will change it. Thanks!
+ MSR_IA32_U_CET, MSR_IA32_PL3_SSP,And then is_xstate_msr(). The intent to is check if an MSR is managed as part of
+};
+
+static bool is_xsaves_msr(u32 index)
the xstate, not if the MSR is somehow related to XSAVE itself.