Re: [PATCH v1 2/6] KVM: x86: Virtualize CR4.LASS

From: Sean Christopherson
Date: Wed Aug 16 2023 - 18:17:48 EST


Belatedly, same complaints as the LAM series[*], this patch doesn't actually
virtual LASS. Just squash this with the previous patch, "KVM: VMX: Implement and
apply vmx_is_lass_violation() for LASS protection", though I would keep the
shortlog from this patch.

[*] https://lore.kernel.org/all/ZN1CjTQ0zWiOxk6j@xxxxxxxxxx

On Thu, Jun 01, 2023, Zeng Guang wrote:
> Virtualize CR4.LASS[bit 27] under KVM control instead of being guest-owned
> as CR4.LASS generally set once for each vCPU at boot time and won't be
> toggled at runtime. Besides, only if VM has LASS capability enumerated with
> CPUID.(EAX=07H.ECX=1):EAX.LASS[bit 6], KVM allows guest software to be able
> to set CR4.LASS.
>
> Updating cr4_fixed1 to set CR4.LASS bit in the emulated IA32_VMX_CR4_FIXED1
> MSR for guests and allow guests to enable LASS in nested VMX operaion as well.
>
> Notes: Setting CR4.LASS to 1 enable LASS in IA-32e mode. It doesn't take
> effect in legacy mode even if CR4.LASS is set.
>
> Signed-off-by: Zeng Guang <guang.zeng@xxxxxxxxx>
> Tested-by: Xuelian Guo <xuelian.guo@xxxxxxxxx>