aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/book3s.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kvm/book3s.c')
-rw-r--r--arch/powerpc/kvm/book3s.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c
index 9a271f0929c7..604af29b71ed 100644
--- a/arch/powerpc/kvm/book3s.c
+++ b/arch/powerpc/kvm/book3s.c
@@ -26,6 +26,7 @@
26#include <asm/kvm_ppc.h> 26#include <asm/kvm_ppc.h>
27#include <asm/kvm_book3s.h> 27#include <asm/kvm_book3s.h>
28#include <asm/mmu_context.h> 28#include <asm/mmu_context.h>
29#include <linux/gfp.h>
29#include <linux/sched.h> 30#include <linux/sched.h>
30#include <linux/vmalloc.h> 31#include <linux/vmalloc.h>
31 32
@@ -1003,7 +1004,8 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm,
1003 struct kvm_vcpu *vcpu; 1004 struct kvm_vcpu *vcpu;
1004 ulong ga, ga_end; 1005 ulong ga, ga_end;
1005 int is_dirty = 0; 1006 int is_dirty = 0;
1006 int r, n; 1007 int r;
1008 unsigned long n;
1007 1009
1008 mutex_lock(&kvm->slots_lock); 1010 mutex_lock(&kvm->slots_lock);
1009 1011
@@ -1021,7 +1023,7 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm,
1021 kvm_for_each_vcpu(n, vcpu, kvm) 1023 kvm_for_each_vcpu(n, vcpu, kvm)
1022 kvmppc_mmu_pte_pflush(vcpu, ga, ga_end); 1024 kvmppc_mmu_pte_pflush(vcpu, ga, ga_end);
1023 1025
1024 n = ALIGN(memslot->npages, BITS_PER_LONG) / 8; 1026 n = kvm_dirty_bitmap_bytes(memslot);
1025 memset(memslot->dirty_bitmap, 0, n); 1027 memset(memslot->dirty_bitmap, 0, n);
1026 } 1028 }
1027 1029