Re: [PATCH v4 6/7] KVM: selftests: Add coverage for LASS CPUID and CR4 handling

Binbin Wu <[email protected]>
Newsgroups org.kernel.vger.kvm,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest
Message-ID <[email protected]>
On 8/6/2026 9:15 AM, Sohil Mehta wrote:
> Add a LASS selftest for KVM's handling of CPUID advertisement and
> CR4.LASS. Verify that a guest write to CR4.LASS generates #GP, and
> leaves CR4 unchanged, when LASS isn't enumerated in the guest's CPUID.
> 
> Extend set_sregs_test to cover CR4.LASS and verify that KVM_SET_SREGS
> accepts CR4.LASS when LASS is supported, and rejects it, without
> modifying sregs, when it isn't.
> 
> Don't try running with CR4.LASS enabled in the guest or attempt to
> trigger LASS violations. Selftests run guest code in the lower half of
> the address space at CPL0, so enabling CR4.LASS would make the next
> instruction fetch a violation and triple-fault the guest.
> 
> Assisted-by: Claude:claude-opus-5
> Signed-off-by: Sohil Mehta <[email protected]>

Reviewed-by: Binbin Wu <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.