diff options
author | Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> | 2010-12-07 03:35:25 +0100 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-01-12 10:30:41 +0100 |
commit | fb67e14fc90f18250259faf61a269320ea8e4d8f (patch) | |
tree | 4bb294030aa3e43ca5dbf573f39a915452624665 /arch/x86/kvm/mmu.c | |
parent | KVM: MMU: fix accessed bit set on prefault path (diff) | |
download | linux-fb67e14fc90f18250259faf61a269320ea8e4d8f.tar.xz linux-fb67e14fc90f18250259faf61a269320ea8e4d8f.zip |
KVM: MMU: retry #PF for softmmu
Retry #PF for softmmu only when the current vcpu has the same cr3 as the time
when #PF occurs
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.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index d475b6b87dce..abda57fac659 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -2608,9 +2608,11 @@ static int nonpaging_page_fault(struct kvm_vcpu *vcpu, gva_t gva, 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; + arch.cr3 = vcpu->arch.mmu.get_cr3(vcpu); return kvm_setup_async_pf(vcpu, gva, gfn, &arch); } |