Re: [PATCH 10/16] KVM: x86/tdp_mmu: Support TDX private mapping for TDP MMU

From: Isaku Yamahata
Date: Wed May 15 2024 - 13:35:48 EST


On Tue, May 14, 2024 at 05:59:46PM -0700,
Rick Edgecombe <rick.p.edgecombe@xxxxxxxxx> wrote:

..snip...

> @@ -619,6 +776,8 @@ static inline int tdp_mmu_zap_spte_atomic(struct kvm *kvm,
> */
> __kvm_tdp_mmu_write_spte(iter->sptep, SHADOW_NONPRESENT_VALUE);
>
> +
> + role = sptep_to_sp(iter->sptep)->role;
> /*
> * Process the zapped SPTE after flushing TLBs, and after replacing
> * REMOVED_SPTE with 0. This minimizes the amount of time vCPUs are
> @@ -626,7 +785,7 @@ static inline int tdp_mmu_zap_spte_atomic(struct kvm *kvm,
> * SPTEs.
> */
> handle_changed_spte(kvm, iter->as_id, iter->gfn, iter->old_spte,
> - 0, iter->level, true);
> + SHADOW_NONPRESENT_VALUE, role, true);
>
> return 0;
> }

This SHADOW_NONPRESENT_VALUE change should go to another patch at [1]
I replied to [1].

[1] https://lore.kernel.org/kvm/20240507154459.3950778-3-pbonzini@xxxxxxxxxx/
--
Isaku Yamahata <isaku.yamahata@xxxxxxxxx>