mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
ANDROID: KVM: arm64: Don't skip accounting when memcache top-up fails
If topup_hyp_memcache() fails mid-way through a memcache top-up, we should still account for the pages that were successfully added. Don't skip accounting when topup_hyp_memcache() fails. Bug: 373813803 Signed-off-by: Will Deacon <willdeacon@google.com> Change-Id: I2ffcfbe45452600994f5b69b73ea2bd00d64aeae
This commit is contained in:
@@ -981,9 +981,7 @@ int topup_hyp_memcache(struct kvm_vcpu *vcpu)
|
|||||||
err = __topup_hyp_memcache(mc, kvm_mmu_cache_min_pages(vcpu->kvm),
|
err = __topup_hyp_memcache(mc, kvm_mmu_cache_min_pages(vcpu->kvm),
|
||||||
hyp_mc_alloc_fn,
|
hyp_mc_alloc_fn,
|
||||||
kvm_host_pa, NULL);
|
kvm_host_pa, NULL);
|
||||||
if (!err)
|
account_hyp_memcache(mc, prev_nr_pages, vcpu->kvm);
|
||||||
account_hyp_memcache(mc, prev_nr_pages, vcpu->kvm);
|
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user