counting of rmap entries was missed when desc->sptes is full and desc->more is NULL Signed-off-by: Li RongQing <lirongqing@xxxxxxxxx> --- arch/x86/kvm/mmu/mmu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c index a5d0207e7189..8ffa4e40b650 100644 --- a/arch/x86/kvm/mmu/mmu.c +++ b/arch/x86/kvm/mmu/mmu.c @@ -1280,6 +1280,7 @@ static int pte_list_add(struct kvm_vcpu *vcpu, u64 *spte, if (desc->sptes[PTE_LIST_EXT-1]) { desc->more = mmu_alloc_pte_list_desc(vcpu); desc = desc->more; + count += PTE_LIST_EXT; } for (i = 0; desc->sptes[i]; ++i) ++count; -- 2.16.2