mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
KVM: MMU: fix counting of rmap entries in rmap_add()
It seems that rmap entries are under counted. Signed-off-by: Hillf Danton <dhillf@gmail.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
parent
a182d8737f
commit
cb16a7b387
1 changed files with 2 additions and 1 deletions
|
@ -632,6 +632,7 @@ static int rmap_add(struct kvm_vcpu *vcpu, u64 *spte, gfn_t gfn)
|
|||
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);
|
||||
|
@ -644,7 +645,7 @@ static int rmap_add(struct kvm_vcpu *vcpu, u64 *spte, gfn_t gfn)
|
|||
desc = desc->more;
|
||||
}
|
||||
for (i = 0; desc->sptes[i]; ++i)
|
||||
;
|
||||
++count;
|
||||
desc->sptes[i] = spte;
|
||||
}
|
||||
return count;
|
||||
|
|
Loading…
Reference in a new issue