[PATCH] KVM: x86: mmu: fix counting of rmap entries in rmap_add()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It seems that rmap entries are under counted.

Signed-off-by: Hillf Danton <dhillf@xxxxxxxxx>
---

--- o/linux-2.6.36-rc1/arch/x86/kvm/mmu.c	2010-08-16 08:41:38.000000000 +0800
+++ m/linux-2.6.36-rc1/arch/x86/kvm/mmu.c	2010-09-18 07:51:44.000000000 +0800
@@ -591,6 +591,7 @@ static int rmap_add(struct kvm_vcpu *vcp
 		desc->sptes[0] = (u64 *)*rmapp;
 		desc->sptes[1] = spte;
 		*rmapp = (unsigned long)desc | 1;
+		++count;
 	} else {
 		rmap_printk("rmap_add: %p %llx many->many\n", spte, *spte);
 		desc = (struct kvm_rmap_desc *)(*rmapp & ~1ul);
@@ -603,7 +604,7 @@ static int rmap_add(struct kvm_vcpu *vcp
 			desc = desc->more;
 		}
 		for (i = 0; desc->sptes[i]; ++i)
-			;
+			++count;
 		desc->sptes[i] = spte;
 	}
 	return count;
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux