Re: [PATCH] KVM: nSVM: Add missing CET VMRUN consistency checks

From: Jim Mattson

Date: Tue Nov 10 2026 - 14:45:50 EST


On Tue, Nov 10, 2026 at 11:30 AM Yosry Ahmed <yosry@xxxxxxxxxx> wrote:
>
> On Tue, Nov 10, 2026 at 11:18 AM Jim Mattson <jmattson@xxxxxxxxxx> wrote:
> >
> > On Tue, Nov 10, 2026 at 9:56 AM Yosry Ahmed <yosry@xxxxxxxxxx> wrote:
> > >
[ ... ]
> > > One last question, in the restore path, the MSR may have not been
> > > restored yet, right? Can the consistency check mistakenly fail in this
> > > case?
> >
> > Not with a legal snapshot. Note that on the restore path, the 'save'
> > area holds L1 state. Hence, RFLAGS.VM must be clear, because VMRUN
> > raises #UD in V8086 mode.
>
> Oh that's subtle, but yes, makes sense. I was going to suggest a
> comment, but I can't find a good place for it :)

Saved by subtlety!