summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/mmu.c
diff options
context:
space:
mode:
authorXiao Guangrong <xiaoguangrong@cn.fujitsu.com>2010-11-12 14:49:55 +0800
committerAvi Kivity <avi@redhat.com>2011-01-12 11:29:14 +0200
commitc4806acdcec020fe5bbb054ce9dc75aaecaf29dd (patch)
tree0fafeeb72efdb8985165fcab0a24ffcc5071653c /arch/x86/kvm/mmu.c
parent060c2abe6c5e0f90418baf0a43b48d8d9a5521fb (diff)
KVM: MMU: fix apf prefault if nested guest is enabled
If apf is generated in L2 guest and is completed in L1 guest, it will prefault this apf in L1 guest's mmu context. Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/mmu.c')
-rw-r--r--arch/x86/kvm/mmu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index db0fd555a5a2..ab100a7e0c49 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -2609,6 +2609,7 @@ static int kvm_arch_setup_async_pf(struct kvm_vcpu *vcpu, gva_t gva, gfn_t gfn)
struct kvm_arch_async_pf arch;
arch.token = (vcpu->arch.apf.id++ << 12) | vcpu->vcpu_id;
arch.gfn = gfn;
+ arch.direct_map = vcpu->arch.mmu.direct_map;
return kvm_setup_async_pf(vcpu, gva, gfn, &arch);
}