diff options
author | Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> | 2012-07-17 21:54:11 +0800 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2012-07-19 21:15:25 -0300 |
commit | 903816fa4d016e20ec71a1a97700cfcdda115580 (patch) | |
tree | c7208520a6de2f0170ce181517d3ea9479eb2eb7 /arch/x86/kvm/mmu.c | |
parent | 86fde74cf5b829627b37ca86322acfdd99b524b8 (diff) | |
download | blackbird-op-linux-903816fa4d016e20ec71a1a97700cfcdda115580.tar.gz blackbird-op-linux-903816fa4d016e20ec71a1a97700cfcdda115580.zip |
KVM: using get_fault_pfn to get the fault pfn
Using get_fault_pfn to cleanup the code
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm/mmu.c')
-rw-r--r-- | arch/x86/kvm/mmu.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 685a48557389..f85cc21ae95d 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -2513,10 +2513,8 @@ static pfn_t pte_prefetch_gfn_to_pfn(struct kvm_vcpu *vcpu, gfn_t gfn, unsigned long hva; slot = gfn_to_memslot_dirty_bitmap(vcpu, gfn, no_dirty_log); - if (!slot) { - get_page(fault_page); - return page_to_pfn(fault_page); - } + if (!slot) + return get_fault_pfn(); hva = gfn_to_hva_memslot(slot, gfn); |