From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: [PATCH v2 01/15] KVM: MMU: fix the count of spte number Date: Thu, 5 Sep 2013 18:29:04 +0800 Message-ID: <1378376958-27252-2-git-send-email-xiaoguangrong@linux.vnet.ibm.com> References: <1378376958-27252-1-git-send-email-xiaoguangrong@linux.vnet.ibm.com> Cc: avi.kivity@gmail.com, mtosatti@redhat.com, pbonzini@redhat.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Xiao Guangrong To: gleb@redhat.com Return-path: In-Reply-To: <1378376958-27252-1-git-send-email-xiaoguangrong@linux.vnet.ibm.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org If the desc is the last one and it is full, its sptes is not counted Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 6e2d2c8..7714fd8 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -948,6 +948,7 @@ static int pte_list_add(struct kvm_vcpu *vcpu, u64 *spte, count += PTE_LIST_EXT; } if (desc->sptes[PTE_LIST_EXT-1]) { + count += PTE_LIST_EXT; desc->more = mmu_alloc_pte_list_desc(vcpu); desc = desc->more; } -- 1.8.1.4