Re: [PATCH 2/4] KVM: x86/mmu: Harden "map private PFN" against unexpected root invalidation
From: Edgecombe, Rick P
Date: Mon Aug 10 2026 - 16:07:09 EST
On Fri, 2026-08-07 at 15:18 -0700, Sean Christopherson wrote:
> Yeah, I don't love the comment either. The subtlety that it doesn't capture is
> that KVM_REQ_MMU_FREE_OBSOLETE_ROOTS doesn't actually mean the current root is
> invalid, just that it might be invalid and the vCPU needs to check.
>
> How about this?
>
> /*
> * Because slots_lock is held, it should be impossible for *any*
> * roots to be invalidated after the initial MMU reload. WARN,
> * but continue on; the above MMU reload will do the right thing
> * if the current root is actually invalid.
> */
Looks good! thanks