Re: [PATCH v9 08/22] KVM: VMX: Set FRED MSR intercepts

From: Sean Christopherson

Date: Wed Mar 04 2026 - 19:48:59 EST


On Wed, Nov 12, 2025, Chao Gao wrote:
> On Sun, Oct 26, 2025 at 01:18:56PM -0700, Xin Li (Intel) wrote:
> >From: Xin Li <xin3.li@xxxxxxxxx>
> >
> >On a userspace MSR filter change, set FRED MSR intercepts.
> >
> >The eight FRED MSRs, MSR_IA32_FRED_RSP[123], MSR_IA32_FRED_STKLVLS,
> >MSR_IA32_FRED_SSP[123] and MSR_IA32_FRED_CONFIG, are all safe to
> >passthrough, because each has a corresponding host and guest field
> >in VMCS.
>
> Sean prefers to pass through MSRs only when there is a reason to do that rather
> than just because it is free. My thinking is that RSPs and SSPs are per-task
> and are context-switched frequently, so we need to pass through them. But I am
> not sure if there is a reason for STKLVLS and CONFIG.

There are VMCS fields, at which point intercepting and emulating is probably
more work than just letting the guest access directly. :-/

Ah, and there needs to be VMCS fields because presumably everything needs to be
switch atomically, e.g. an NMI that arrives shortly after VM-Exit presumbably
consumes STKLVLS and CONFIG.