Re: [PATCH v4 5/7] KVM: x86: Virtualize LASS and advertise support to userspace

From: Binbin Wu

Date: Wed Aug 19 2026 - 05:06:22 EST


On 8/6/2026 9:15 AM, Sohil Mehta wrote:
> From: Zeng Guang <guang.zeng@xxxxxxxxx>
>
> Virtualize Linear Address Space Separation (LASS) by letting the guest
> enable CR4.LASS[bit 27]. Allow the guest to set CR4.LASS only if LASS is
> enumerated in the guest's CPUID. Set CR4.LASS in the emulated
> IA32_VMX_CR4_FIXED1 MSR so that LASS can be enabled in nested VMX
> operation as well.
>
> Keep CR4.LASS KVM-owned instead of making it guest-owned. LASS is
> expected to be enabled once per vCPU at boot and rarely toggled at
> runtime.
>
> LASS is enumerated by CPUID.(EAX=07H,ECX=1):EAX.LASS[bit 6] and only
> works in IA-32e mode. Advertise LASS to userspace on 64-bit kernels and
> only when it is supported by the host. Notably, it will not be exposed
> to userspace if the deprecated vsyscall=emulate mode is set on the
^
Nit: mode could be dropped.

> kernel command line.
>
> Signed-off-by: Zeng Guang <guang.zeng@xxxxxxxxx>
> Signed-off-by: Binbin Wu <binbin.wu@xxxxxxxxxxxxxxx>
> Signed-off-by: Sohil Mehta <sohil.mehta@xxxxxxxxx>
Reviewed-by: Binbin Wu <binbin.wu@xxxxxxxxxxxxxxx>