KVM: Don't call get_user_pages(.force = 1)
authorAvi Kivity <avi@qumranet.com>
Thu, 6 Aug 2009 17:39:45 +0000 (14:39 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 9 Sep 2009 03:17:03 +0000 (20:17 -0700)
(cherry picked from commit d657c7335b97d746aa6123c56504b46c20e37df3)

This is esoteric and only needed to break COW on MAP_SHARED mappings.  Since
KVM no longer does these sorts of mappings, breaking COW on them is no longer
necessary.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
virt/kvm/kvm_main.c

index 7dd9b0b..46474af 100644 (file)
@@ -726,7 +726,7 @@ pfn_t gfn_to_pfn(struct kvm *kvm, gfn_t gfn)
                return page_to_pfn(bad_page);
        }
 
-       npages = get_user_pages(current, current->mm, addr, 1, 1, 1, page,
+       npages = get_user_pages(current, current->mm, addr, 1, 1, 0, page,
                                NULL);
 
        if (unlikely(npages != 1)) {