On Wed, Feb 03, 2021 at 12:57:41PM +0100, Paolo Bonzini wrote: > On 03/02/21 12:34, Yang Weijiang wrote: > > MSRs that are switched through XSAVES are especially annoying due to the > > possibility of the kernel's FPU being used in IRQ context. Disable IRQs > > and ensure the guest's FPU state is loaded when accessing such MSRs. > > Good catch! This should be in x86.h and named kvm_get/set_xsave_msr because > it's not VMX specific. The commit message should also be there as a > comment. Thanks a lot for reviewing! These words came from Sean! :-D > > In addition, > > > + case MSR_IA32_S_CET: > > + if (!cet_is_control_msr_accessible(vcpu, msr_info)) > > + return 1; > > + msr_info->data = vmcs_readl(GUEST_S_CET); > > + break; > > + case MSR_IA32_U_CET: > > + if (!cet_is_control_msr_accessible(vcpu, msr_info)) > > + return 1; > > + vmx_get_xsave_msr(msr_info); > > + break; > > these two might as well be the same "case" for symmetry with the handling of > WRMSR. > > I've fixed this up locally, since these patches will not be pushed to Linus > until the corresponding bare metal support is there. Got it! > > Paolo
- [PATCH v15 00/14] Introduce support for guest CET feature Yang Weijiang
- [PATCH v15 02/14] KVM: x86: Refresh CPUID on writes to ... Yang Weijiang
- [PATCH v15 01/14] KVM: x86: Report XSS as an MSR to be ... Yang Weijiang
- [PATCH v15 03/14] KVM: x86: Load guest fpu state when a... Yang Weijiang
- [PATCH v15 04/14] KVM: x86: Add #CP support in guest ex... Yang Weijiang
- [PATCH v15 07/14] KVM: VMX: Emulate reads and writes to... Yang Weijiang
- Re: [PATCH v15 07/14] KVM: VMX: Emulate reads and w... Paolo Bonzini
- Re: [PATCH v15 07/14] KVM: VMX: Emulate reads a... Yang Weijiang
- [PATCH v15 10/14] KVM: x86: Enable CET virtualization f... Yang Weijiang
- [PATCH v15 06/14] KVM: x86: Add fault checks for CR4.CE... Yang Weijiang
- [PATCH v15 09/14] KVM: x86: Report CET MSRs as to-be-sa... Yang Weijiang
- [PATCH v15 05/14] KVM: VMX: Introduce CET VMCS fields a... Yang Weijiang
- [PATCH v15 08/14] KVM: VMX: Add a synthetic MSR to allo... Yang Weijiang
- [PATCH v15 13/14] KVM: nVMX: Enable CET support for nes... Yang Weijiang
- [PATCH v15 12/14] KVM: nVMX: Add helper to check the vm... Yang Weijiang
- [PATCH v15 11/14] KVM: VMX: Pass through CET MSRs to th... Yang Weijiang
- [PATCH v15 14/14] KVM: x86: Save/Restore GUEST_SSP to/f... Yang Weijiang
- Re: [PATCH v15 14/14] KVM: x86: Save/Restore GUEST_... Paolo Bonzini

