Re: [PATCH] KVM: SVM: Trigger new ASID allocation in both VMCBs on pCPU switch
From: Sean Christopherson
Date: Thu Sep 03 2026 - 18:28:11 EST
On Thu, Sep 03, 2026, Yosry Ahmed wrote:
> On Thu, Sep 3, 2026 at 3:18 PM Sean Christopherson <seanjc@xxxxxxxxxx> wrote:
> > Keep the change in svm_allocate_nested(). Or just do nothing, I'll happily drop
> > the svm->nested.initialized check when applying.
>
> You'll need to update the changelog too.
>
> Instead of:
>
> Additionally, initialize the tracker pCPU for vmcb02 to -1 on nested
> enablement, so that the new ASID allocation in the scenario above
> happens even if EFER.SVME is disabled in L1 before migrating to the new
> pCPU (so asid_generation in vmcb02 is not reset), but enabled before
> returning to the old pCPU.
>
> Maybe:
>
> Additionally, initialize the tracked pCPU for vmcb02 to -1 on nested
> enablement as hardening, so that a new ASID allocation is always
> triggered when nested is disabled and re-enabled.
>
> Let me know if you still wanna fixup when applying or a v2 :)
LOL, just send a v2.