diff options
author | Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> | 2012-08-20 22:59:12 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-08-22 08:08:52 -0400 |
commit | 037d92dc5d4691ae7cf44699c55ca83b1b441992 (patch) | |
tree | e3ec9d29b4312a11087c008551ea1ba54bdd7c13 /arch/x86/kvm/mmu.c | |
parent | 67b29204c8c9ecb4b2799a06ab646eeb363a0fe6 (diff) |
KVM: introduce gfn_to_pfn_memslot_atomic
It can instead of hva_to_pfn_atomic
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.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 | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 9651c2cd0005..5548971ae80d 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -2510,15 +2510,12 @@ static pfn_t pte_prefetch_gfn_to_pfn(struct kvm_vcpu *vcpu, gfn_t gfn, | |||
2510 | bool no_dirty_log) | 2510 | bool no_dirty_log) |
2511 | { | 2511 | { |
2512 | struct kvm_memory_slot *slot; | 2512 | struct kvm_memory_slot *slot; |
2513 | unsigned long hva; | ||
2514 | 2513 | ||
2515 | slot = gfn_to_memslot_dirty_bitmap(vcpu, gfn, no_dirty_log); | 2514 | slot = gfn_to_memslot_dirty_bitmap(vcpu, gfn, no_dirty_log); |
2516 | if (!slot) | 2515 | if (!slot) |
2517 | return KVM_PFN_ERR_FAULT; | 2516 | return KVM_PFN_ERR_FAULT; |
2518 | 2517 | ||
2519 | hva = gfn_to_hva_memslot(slot, gfn); | 2518 | return gfn_to_pfn_memslot_atomic(slot, gfn); |
2520 | |||
2521 | return hva_to_pfn_atomic(hva); | ||
2522 | } | 2519 | } |
2523 | 2520 | ||
2524 | static int direct_pte_prefetch_many(struct kvm_vcpu *vcpu, | 2521 | static int direct_pte_prefetch_many(struct kvm_vcpu *vcpu, |