Skip to content

Commit

Permalink
KVM: Get rid of dead function gva_to_page()
Browse files Browse the repository at this point in the history
Nobody use gva_to_page() anymore, get rid of it.

Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
  • Loading branch information
Gui Jianfeng authored and Avi Kivity committed May 17, 2010
1 parent b2fc15a commit 2a059bf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
14 changes: 0 additions & 14 deletions arch/x86/kvm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1618,20 +1618,6 @@ static void mmu_convert_notrap(struct kvm_mmu_page *sp)
}
}

struct page *gva_to_page(struct kvm_vcpu *vcpu, gva_t gva)
{
struct page *page;

gpa_t gpa = kvm_mmu_gva_to_gpa_read(vcpu, gva, NULL);

if (gpa == UNMAPPED_GVA)
return NULL;

page = gfn_to_page(vcpu->kvm, gpa >> PAGE_SHIFT);

return page;
}

/*
* The function is based on mtrr_type_lookup() in
* arch/x86/kernel/cpu/mtrr/generic.c
Expand Down
1 change: 0 additions & 1 deletion include/linux/kvm_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ static inline struct kvm_memslots *kvm_memslots(struct kvm *kvm)
#define HPA_MSB ((sizeof(hpa_t) * 8) - 1)
#define HPA_ERR_MASK ((hpa_t)1 << HPA_MSB)
static inline int is_error_hpa(hpa_t hpa) { return hpa >> HPA_MSB; }
struct page *gva_to_page(struct kvm_vcpu *vcpu, gva_t gva);

extern struct page *bad_page;
extern pfn_t bad_pfn;
Expand Down

0 comments on commit 2a059bf

Please sign in to comment.