On 10/26/2026 10:22 AM, Sohil Mehta wrote: > On 10/26/2026 9:04 AM, Sean Christopherson wrote: > >> And we'd want to keep the optimizations to elide writes when vCPUs are using >> the >> same value(s). So, compile tested only... >> > > Will test this out on real hardware with the MSR_STAR change below. > With MSR_STAR not restored (original patch), the kernel boots fine, but a guest's STAR stays loaded and it triggers a ERETS #GP as expected when CS/SS has a mismatch.
With MSR_STAR dropped from kvm_is_msr_used_in_host(), it works as expected. x86 KVM selftests pass and the systems runs without issues. A few AI generated scripts and tests confirmed that STAR is restored each time and LSTAR/SYSCALL_MASK is left at the guest's values when FRED is enabled. Also, SYSCALL in each guest still lands on its own LSTAR when two VMs alternate on one pCPU. Tested-by: Sohil Mehta <[email protected]>
