public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH]  KVM: x86/mmu: Conditionally call kvm_zap_obsolete_pages
@ 2024-07-30  5:32 flyingpenghao
  2024-07-30  9:16 ` Paolo Bonzini
  0 siblings, 1 reply; 10+ messages in thread
From: flyingpenghao @ 2024-07-30  5:32 UTC (permalink / raw)
  To: seanjc, pbonzini; +Cc: kvm, Peng Hao

From: Peng Hao <flyingpeng@tencent.com>

When tdp_mmu is enabled, invalid root calls kvm_tdp_mmu_zap_invalidated_roots
to implement it, and kvm_zap_obsolete_pages is not used.

Signed-off-by: Peng Hao <flyingpeng@tencent.com>
---
 arch/x86/kvm/mmu/mmu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
index 901be9e420a4..e91586c2ef87 100644
--- a/arch/x86/kvm/mmu/mmu.c
+++ b/arch/x86/kvm/mmu/mmu.c
@@ -6447,7 +6447,8 @@ static void kvm_mmu_zap_all_fast(struct kvm *kvm)
 	 */
 	kvm_make_all_cpus_request(kvm, KVM_REQ_MMU_FREE_OBSOLETE_ROOTS);
 
-	kvm_zap_obsolete_pages(kvm);
+	if (!tdp_mmu_enabled)
+		kvm_zap_obsolete_pages(kvm);
 
 	write_unlock(&kvm->mmu_lock);
 
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-08-01  4:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-30  5:32 [PATCH] KVM: x86/mmu: Conditionally call kvm_zap_obsolete_pages flyingpenghao
2024-07-30  9:16 ` Paolo Bonzini
2024-07-30 20:27   ` Sean Christopherson
2024-07-31  9:09     ` Hao Peng
2024-07-31 10:00       ` Paolo Bonzini
2024-07-31 11:19         ` Hao Peng
2024-07-31 15:00           ` Paolo Bonzini
2024-07-31 15:20             ` Sean Christopherson
2024-07-31 16:07               ` Paolo Bonzini
2024-08-01  4:33             ` Hao Peng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox