diff options
author | Avi Kivity <avi@qumranet.com> | 2008-05-29 07:56:28 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-07-20 05:42:30 -0400 |
commit | 131d82791b628d4aeafd94ddc74a9b68f3d15a83 (patch) | |
tree | edee39aaef0af651a6b5799fe71a81e180701320 /arch/x86/kvm/mmu.c | |
parent | d761a501cf9cd4fa08ff35d252ff08b8c31ce677 (diff) |
KVM: MMU: Avoid page prefetch on SVM
SVM cannot benefit from page prefetching since guest page fault bypass
cannot by made to work there. Avoid accessing the guest page table in
this case.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86/kvm/mmu.c')
-rw-r--r-- | arch/x86/kvm/mmu.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 62741b7c4223..5ebb2788bd73 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -850,7 +850,10 @@ static struct kvm_mmu_page *kvm_mmu_get_page(struct kvm_vcpu *vcpu, | |||
850 | hlist_add_head(&sp->hash_link, bucket); | 850 | hlist_add_head(&sp->hash_link, bucket); |
851 | if (!metaphysical) | 851 | if (!metaphysical) |
852 | rmap_write_protect(vcpu->kvm, gfn); | 852 | rmap_write_protect(vcpu->kvm, gfn); |
853 | vcpu->arch.mmu.prefetch_page(vcpu, sp); | 853 | if (shadow_trap_nonpresent_pte != shadow_notrap_nonpresent_pte) |
854 | vcpu->arch.mmu.prefetch_page(vcpu, sp); | ||
855 | else | ||
856 | nonpaging_prefetch_page(vcpu, sp); | ||
854 | return sp; | 857 | return sp; |
855 | } | 858 | } |
856 | 859 | ||