Re: [PATCH 4/7] KVM: nVMX: Process each host MSR entry at most once when unwinding failed VM-Entry
From: Jim Mattson
Date: Mon Nov 02 2026 - 19:34:58 EST
On Mon, Nov 2, 2026 at 4:10 PM Sean Christopherson <seanjc@xxxxxxxxxx> wrote:
>
> On Mon, Nov 02, 2026, Jim Mattson wrote:
> > On Mon, Nov 2, 2026 at 3:19 PM Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
> > >
> > > From: Sean Christopherson <seanjc@xxxxxxxxxx>
> > >
> > > Add a missing "break" in the inner for-loop of the open coded mess that
> > > unwinds MSRs back to the pre-VM-Enter state when VMLAUNCH/VMRESUME VM-Fails
> > > due to a consistency check that is caught by hardware but missed by KVM.
> >
> > That sentence does not accurately describe what the code does.
>
> "attempts to unwind MSRs back to the pre-VM-Enter state"
KVM makes no attempt to restore MSR values to the pre-VM-Enter state.
MSRs are forwarded to a post-VM-exit state, as if VM-entry had not
failed.