]> git.baikalelectronics.ru Git - kernel.git/commitdiff
KVM: X86/MMU: Remove useless mmu_topup_memory_caches() in kvm_mmu_pte_write()
authorLai Jiangshan <jiangshan.ljs@antgroup.com>
Sun, 5 Jun 2022 06:34:16 +0000 (14:34 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 15 Jun 2022 12:07:53 +0000 (08:07 -0400)
Since the commit efc1041d778e("KVM: x86/mmu: Remove the defunct
update_pte() paging hook"), kvm_mmu_pte_write() no longer uses the rmap
cache.

So remove mmu_topup_memory_caches() in it.

Cc: Sean Christopherson <seanjc@google.com>
Signed-off-by: Lai Jiangshan <jiangshan.ljs@antgroup.com>
Message-Id: <20220605063417.308311-6-jiangshanlai@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c

index f168693695bdf62d17628e27a3b662613892a269..0a4438544c0df3eaa0c9de391e0b0f4632ae97b9 100644 (file)
@@ -5326,13 +5326,6 @@ static void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa,
 
        pgprintk("%s: gpa %llx bytes %d\n", __func__, gpa, bytes);
 
-       /*
-        * No need to care whether allocation memory is successful
-        * or not since pte prefetch is skipped if it does not have
-        * enough objects in the cache.
-        */
-       mmu_topup_memory_caches(vcpu, true);
-
        write_lock(&vcpu->kvm->mmu_lock);
 
        gentry = mmu_pte_write_fetch_gpte(vcpu, &gpa, &bytes);