[PATCH 30/39] KVM: Don't call get_user_pages(.force = 1)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Avi Kivity
Date: Thursday, September 25, 2008 - 4:55 am

From: Avi Kivity <avi@qumranet.com>

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>
---
 virt/kvm/kvm_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 0309571..de3b029 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -734,7 +734,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)) {
-- 
1.6.0.1

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 06/39] KVM: fix i8259 reset irq acking, Avi Kivity, (Thu Sep 25, 4:54 am)
[PATCH 13/39] KVM: SVM: Fix typo, Avi Kivity, (Thu Sep 25, 4:54 am)
[PATCH 19/39] KVM: Load real mode segments correctly, Avi Kivity, (Thu Sep 25, 4:54 am)
[PATCH 26/39] KVM: MMU: Add generic shadow walker, Avi Kivity, (Thu Sep 25, 4:54 am)
[PATCH 30/39] KVM: Don't call get_user_pages(.force = 1), Avi Kivity, (Thu Sep 25, 4:55 am)
[PATCH 37/39] KVM: add MC5_MISC msr read support, Avi Kivity, (Thu Sep 25, 4:55 am)