[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4b2bea4b62445db76b5ac5c6083a72ffffd8f5d0.camel@intel.com>
Date: Tue, 10 Sep 2024 23:58:01 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "kvm@...r.kernel.org" <kvm@...r.kernel.org>, "pbonzini@...hat.com"
<pbonzini@...hat.com>, "seanjc@...gle.com" <seanjc@...gle.com>, "Huang, Kai"
<kai.huang@...el.com>
CC: "nik.borisov@...e.com" <nik.borisov@...e.com>, "dmatlack@...gle.com"
<dmatlack@...gle.com>, "isaku.yamahata@...il.com" <isaku.yamahata@...il.com>,
"Zhao, Yan Y" <yan.y.zhao@...el.com>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 14/21] KVM: TDX: Implement hooks to propagate changes of
TDP MMU mirror page table
On Tue, 2024-09-10 at 11:33 +0200, Paolo Bonzini wrote:
> > But actually, I wonder if we need to remove the KVM_BUG_ON(). I think if you
> > did
> > a KVM_PRE_FAULT_MEMORY and then deleted the memslot you could hit it?
>
> I think all paths to handle_removed_pt() are safe:
>
> __tdp_mmu_zap_root
> tdp_mmu_zap_root
> kvm_tdp_mmu_zap_all
> kvm_arch_flush_shadow_all
> kvm_flush_shadow_all
> kvm_destroy_vm (*)
> kvm_mmu_notifier_release (*)
> kvm_tdp_mmu_zap_invalidated_roots
> kvm_mmu_zap_all_fast (**)
> kvm_tdp_mmu_zap_sp
> kvm_recover_nx_huge_pages (***)
But not all paths to remove_external_spte():
kvm_arch_flush_shadow_memslot()
kvm_mmu_zap_memslot_leafs()
kvm_tdp_mmu_unmap_gfn_range()
tdp_mmu_zap_leafs()
tdp_mmu_iter_set_spte()
tdp_mmu_set_spte()
remove_external_spte()
tdx_sept_remove_private_spte()
But we can probably keep the warning if we prevent KVM_PRE_FAULT_MEMORY as you
pointed earlier. I didn't see that that kvm->arch.pre_fault_allowed got added.
Powered by blists - more mailing lists