KVM: introduce gfn_to_pfn_memslot_atomic
[linux-3.10.git] / arch / x86 / kvm / mmu.c
index 9651c2c..5548971 100644 (file)
@@ -2510,15 +2510,12 @@ static pfn_t pte_prefetch_gfn_to_pfn(struct kvm_vcpu *vcpu, gfn_t gfn,
                                     bool no_dirty_log)
 {
        struct kvm_memory_slot *slot;
-       unsigned long hva;
 
        slot = gfn_to_memslot_dirty_bitmap(vcpu, gfn, no_dirty_log);
        if (!slot)
                return KVM_PFN_ERR_FAULT;
 
-       hva = gfn_to_hva_memslot(slot, gfn);
-
-       return hva_to_pfn_atomic(hva);
+       return gfn_to_pfn_memslot_atomic(slot, gfn);
 }
 
 static int direct_pte_prefetch_many(struct kvm_vcpu *vcpu,