diff options
author | chai wen <chaiw.fnst@cn.fujitsu.com> | 2013-10-14 10:22:33 -0400 |
---|---|---|
committer | Gleb Natapov <gleb@redhat.com> | 2013-10-15 06:43:37 -0400 |
commit | f2e106692d5189303997ad7b96de8d8123aa5613 (patch) | |
tree | be15cad31bc5701570a571b3be04e299bb4ac547 /arch/x86/kvm | |
parent | a7efdf6bec34f1a693a926ebd08de6ba6e700dff (diff) |
KVM: Drop FOLL_GET in GUP when doing async page fault
Page pinning is not mandatory in kvm async page fault processing since
after async page fault event is delivered to a guest it accesses page once
again and does its own GUP. Drop the FOLL_GET flag in GUP in async_pf
code, and do some simplifying in check/clear processing.
Suggested-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Gu zheng <guz.fnst@cn.fujitsu.com>
Signed-off-by: chai wen <chaiw.fnst@cn.fujitsu.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/x86.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index c951c71dc80b..edf2a07df3a3 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -7298,7 +7298,7 @@ void kvm_arch_async_page_ready(struct kvm_vcpu *vcpu, struct kvm_async_pf *work) | |||
7298 | int r; | 7298 | int r; |
7299 | 7299 | ||
7300 | if ((vcpu->arch.mmu.direct_map != work->arch.direct_map) || | 7300 | if ((vcpu->arch.mmu.direct_map != work->arch.direct_map) || |
7301 | is_error_page(work->page)) | 7301 | work->wakeup_all) |
7302 | return; | 7302 | return; |
7303 | 7303 | ||
7304 | r = kvm_mmu_reload(vcpu); | 7304 | r = kvm_mmu_reload(vcpu); |
@@ -7408,7 +7408,7 @@ void kvm_arch_async_page_present(struct kvm_vcpu *vcpu, | |||
7408 | struct x86_exception fault; | 7408 | struct x86_exception fault; |
7409 | 7409 | ||
7410 | trace_kvm_async_pf_ready(work->arch.token, work->gva); | 7410 | trace_kvm_async_pf_ready(work->arch.token, work->gva); |
7411 | if (is_error_page(work->page)) | 7411 | if (work->wakeup_all) |
7412 | work->arch.token = ~0; /* broadcast wakeup */ | 7412 | work->arch.token = ~0; /* broadcast wakeup */ |
7413 | else | 7413 | else |
7414 | kvm_del_async_pf_gfn(vcpu, work->arch.gfn); | 7414 | kvm_del_async_pf_gfn(vcpu, work->arch.gfn); |