Re: [PATCH v3 01/27] KVM: nSVM: Flush the TLB after forcefully leaving nested

From: Yosry Ahmed

Date: Wed Oct 14 2026 - 12:00:22 EST


On Wed, Oct 14, 2026 at 8:02 AM Jim Mattson <jmattson@xxxxxxxxxx> wrote:
>
> On Mon, Oct 12, 2026 at 4:36 PM Yosry Ahmed <yosry@xxxxxxxxxx> wrote:
> >
> > KVM flushes the TLB on nested VM-Enter and nested VM-Exit, but not when
> > forcefully leaving nested. In this case, L2 TLB entries can leak into
> > L1. Flush the TLB after forcefully exiting L2, similar to nested
> > VM-Exits.
> >
> > Note that vmx_leave_nested() handles this correctly, as it reuses
> > nested_vmx_vmexit(), which handles the necessary TLB flushes on an L2 ->
> > L1 transition.
>
> Fixes: ???

I figured it was too old to be meaningful (i.e. we'll backport to all
active stable kernels anyway).

But I think it should be:

Fixes: c513f484c558 ("KVM: nSVM: leave guest mode when clearing EFER.SVME")

> > Cc: stable@xxxxxxxxxxxxxxx
> > Signed-off-by: Yosry Ahmed <yosry@xxxxxxxxxx>
> Reviewed-by: Jim Mattson <jmattson@xxxxxxxxxx>