Re: [PATCH] KVM: nSVM: Leave nested if loading CR3 fails at the end of KVM_SET_NESTED_STATE
From: Jim Mattson
Date: Fri Nov 13 2026 - 13:12:44 EST
On Fri, Nov 13, 2026 at 9:34 AM Sean Christopherson <seanjc@xxxxxxxxxx> wrote:
>
> Force the vCPU out of L2 if loading CR3 load at the end of setting nested
> state fails, otherwise KVM will leave the vCPU in a half-baked state, e.g.
> with L1's page walker, and if nested NPT is disabled, L1's PGD as well.
>
> Fixes: e1779c2714c3 ("KVM: x86: nSVM: fix potential NULL derefernce on nested migration")
> Cc: stable@xxxxxxxxxxxxxxx
> Reported-by: Stefan Teodorescu <fane@xxxxxxxxxx>
> Reported-by: Sashiko Bot <sashiko-bot@xxxxxxxxxx>
> Closes: https://lore.kernel.org/all/sashiko-outbox-210535@xxxxxxxxxx
> Closes: https://lore.kernel.org/all/sashiko-outbox-205939@xxxxxxxxxx
> Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
Reviewed-by: Jim Mattson <jmattson@xxxxxxxxxx>