Re: [RFC PATCH v5 06/45] KVM: x86/mmu: Fold set_external_spte_present() into its sole caller
From: Yan Zhao
Date: Thu Feb 05 2026 - 21:32:18 EST
> > > - ret = set_external_spte_present(kvm, iter->sptep, iter->gfn,
> > > - &iter->old_spte, new_spte, iter->level);
> > Add "lockdep_assert_held(&kvm->mmu_lock)" for this case?
>
> No, because I don't want to unnecessarily bleed TDX details into common MMU. Ah,
> but there was a pre-existing lockdep in set_external_spte_present(). So I guess
> that's arguably a functional change and should be called out in the changelog.
>
> But I still want to drop the assertion (or maybe move it to TDX in a prep patch),
> because ultimately the requirements around locking come from TDX, not from the
> TDP MMU.
LGTM.