lkml.org 
[lkml]   [2010]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v3 12/12] Send async PF when guest is not in userspace too.
Date

Signed-off-by: Gleb Natapov <gleb@redhat.com>
---
arch/x86/kvm/mmu.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 9fd29cb..7945abf 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -2204,7 +2204,13 @@ static bool can_do_async_pf(struct kvm_vcpu *vcpu)
if (!vcpu->arch.apf_data || kvm_event_needs_reinjection(vcpu))
return false;

- return !!kvm_x86_ops->get_cpl(vcpu);
+ if (vcpu->arch.apf_send_user_only)
+ return !!kvm_x86_ops->get_cpl(vcpu);
+
+ if (!kvm_x86_ops->interrupt_allowed(vcpu))
+ return false;
+
+ return true;
}

static int tdp_page_fault(struct kvm_vcpu *vcpu, gva_t gpa, u32 error_code,
--
1.6.5


\
 
 \ /
  Last update: 2010-01-05 15:21    [from the cache]
©2003-2011 Jasper Spaans