projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d81135a
)
KVM: mips: use id_to_memslot correctly
author
Paolo Bonzini
<
[email protected]
>
Mon, 18 May 2015 06:35:43 +0000
(08:35 +0200)
committer
Paolo Bonzini
<
[email protected]
>
Tue, 19 May 2015 18:52:44 +0000
(20:52 +0200)
The argument to KVM_GET_DIRTY_LOG is a memslot id; it may not match the
position in the memslots array, which is sorted by gfn.
Cc:
[email protected]
Reviewed-by: James Hogan <
[email protected]
>
Signed-off-by: Paolo Bonzini <
[email protected]
>
arch/mips/kvm/mips.c
patch
|
blob
|
history
diff --git
a/arch/mips/kvm/mips.c
b/arch/mips/kvm/mips.c
index 71f345b499c8d0df42efb165bb8f171e4af56832..a8e660a444743ef67b58b00bf085ff57edc8c445 100644
(file)
--- a/
arch/mips/kvm/mips.c
+++ b/
arch/mips/kvm/mips.c
@@
-982,7
+982,7
@@
int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, struct kvm_dirty_log *log)
/* If nothing is dirty, don't bother messing with page tables. */
if (is_dirty) {
- memslot =
&kvm->memslots->memslots[log->slot]
;
+ memslot =
id_to_memslot(kvm->memslots, log->slot)
;
ga = memslot->base_gfn << PAGE_SHIFT;
ga_end = ga + (memslot->npages << PAGE_SHIFT);