diff options
author | Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> | 2012-07-17 09:56:16 -0400 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2012-07-19 20:25:24 -0400 |
commit | d566104853361cc377c61f70e41c1ad3d44b86c6 (patch) | |
tree | 6b77f5e4f299bfb0d6c3fa7b3768e7299539f8af /virt/kvm | |
parent | f340a51b7e41abbe92ae3a327c0020974a059f95 (diff) |
KVM: remove the unused parameter of gfn_to_pfn_memslot
The parameter, 'kvm', is not used in gfn_to_pfn_memslot, we can happily remove
it
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'virt/kvm')
-rw-r--r-- | virt/kvm/iommu.c | 10 | ||||
-rw-r--r-- | virt/kvm/kvm_main.c | 15 |
2 files changed, 12 insertions, 13 deletions
diff --git a/virt/kvm/iommu.c b/virt/kvm/iommu.c index e9fff9830bf0..c03f1fb26701 100644 --- a/virt/kvm/iommu.c +++ b/virt/kvm/iommu.c | |||
@@ -42,13 +42,13 @@ static int kvm_iommu_unmap_memslots(struct kvm *kvm); | |||
42 | static void kvm_iommu_put_pages(struct kvm *kvm, | 42 | static void kvm_iommu_put_pages(struct kvm *kvm, |
43 | gfn_t base_gfn, unsigned long npages); | 43 | gfn_t base_gfn, unsigned long npages); |
44 | 44 | ||
45 | static pfn_t kvm_pin_pages(struct kvm *kvm, struct kvm_memory_slot *slot, | 45 | static pfn_t kvm_pin_pages(struct kvm_memory_slot *slot, gfn_t gfn, |
46 | gfn_t gfn, unsigned long size) | 46 | unsigned long size) |
47 | { | 47 | { |
48 | gfn_t end_gfn; | 48 | gfn_t end_gfn; |
49 | pfn_t pfn; | 49 | pfn_t pfn; |
50 | 50 | ||
51 | pfn = gfn_to_pfn_memslot(kvm, slot, gfn); | 51 | pfn = gfn_to_pfn_memslot(slot, gfn); |
52 | end_gfn = gfn + (size >> PAGE_SHIFT); | 52 | end_gfn = gfn + (size >> PAGE_SHIFT); |
53 | gfn += 1; | 53 | gfn += 1; |
54 | 54 | ||
@@ -56,7 +56,7 @@ static pfn_t kvm_pin_pages(struct kvm *kvm, struct kvm_memory_slot *slot, | |||
56 | return pfn; | 56 | return pfn; |
57 | 57 | ||
58 | while (gfn < end_gfn) | 58 | while (gfn < end_gfn) |
59 | gfn_to_pfn_memslot(kvm, slot, gfn++); | 59 | gfn_to_pfn_memslot(slot, gfn++); |
60 | 60 | ||
61 | return pfn; | 61 | return pfn; |
62 | } | 62 | } |
@@ -105,7 +105,7 @@ int kvm_iommu_map_pages(struct kvm *kvm, struct kvm_memory_slot *slot) | |||
105 | * Pin all pages we are about to map in memory. This is | 105 | * Pin all pages we are about to map in memory. This is |
106 | * important because we unmap and unpin in 4kb steps later. | 106 | * important because we unmap and unpin in 4kb steps later. |
107 | */ | 107 | */ |
108 | pfn = kvm_pin_pages(kvm, slot, gfn, page_size); | 108 | pfn = kvm_pin_pages(slot, gfn, page_size); |
109 | if (is_error_pfn(pfn)) { | 109 | if (is_error_pfn(pfn)) { |
110 | gfn += 1; | 110 | gfn += 1; |
111 | continue; | 111 | continue; |
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index f955eee92aa9..68dda513cd72 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -1062,8 +1062,8 @@ static inline int check_user_page_hwpoison(unsigned long addr) | |||
1062 | return rc == -EHWPOISON; | 1062 | return rc == -EHWPOISON; |
1063 | } | 1063 | } |
1064 | 1064 | ||
1065 | static pfn_t hva_to_pfn(struct kvm *kvm, unsigned long addr, bool atomic, | 1065 | static pfn_t hva_to_pfn(unsigned long addr, bool atomic, bool *async, |
1066 | bool *async, bool write_fault, bool *writable) | 1066 | bool write_fault, bool *writable) |
1067 | { | 1067 | { |
1068 | struct page *page[1]; | 1068 | struct page *page[1]; |
1069 | int npages = 0; | 1069 | int npages = 0; |
@@ -1143,9 +1143,9 @@ static pfn_t hva_to_pfn(struct kvm *kvm, unsigned long addr, bool atomic, | |||
1143 | return pfn; | 1143 | return pfn; |
1144 | } | 1144 | } |
1145 | 1145 | ||
1146 | pfn_t hva_to_pfn_atomic(struct kvm *kvm, unsigned long addr) | 1146 | pfn_t hva_to_pfn_atomic(unsigned long addr) |
1147 | { | 1147 | { |
1148 | return hva_to_pfn(kvm, addr, true, NULL, true, NULL); | 1148 | return hva_to_pfn(addr, true, NULL, true, NULL); |
1149 | } | 1149 | } |
1150 | EXPORT_SYMBOL_GPL(hva_to_pfn_atomic); | 1150 | EXPORT_SYMBOL_GPL(hva_to_pfn_atomic); |
1151 | 1151 | ||
@@ -1163,7 +1163,7 @@ static pfn_t __gfn_to_pfn(struct kvm *kvm, gfn_t gfn, bool atomic, bool *async, | |||
1163 | return page_to_pfn(bad_page); | 1163 | return page_to_pfn(bad_page); |
1164 | } | 1164 | } |
1165 | 1165 | ||
1166 | return hva_to_pfn(kvm, addr, atomic, async, write_fault, writable); | 1166 | return hva_to_pfn(addr, atomic, async, write_fault, writable); |
1167 | } | 1167 | } |
1168 | 1168 | ||
1169 | pfn_t gfn_to_pfn_atomic(struct kvm *kvm, gfn_t gfn) | 1169 | pfn_t gfn_to_pfn_atomic(struct kvm *kvm, gfn_t gfn) |
@@ -1192,11 +1192,10 @@ pfn_t gfn_to_pfn_prot(struct kvm *kvm, gfn_t gfn, bool write_fault, | |||
1192 | } | 1192 | } |
1193 | EXPORT_SYMBOL_GPL(gfn_to_pfn_prot); | 1193 | EXPORT_SYMBOL_GPL(gfn_to_pfn_prot); |
1194 | 1194 | ||
1195 | pfn_t gfn_to_pfn_memslot(struct kvm *kvm, | 1195 | pfn_t gfn_to_pfn_memslot(struct kvm_memory_slot *slot, gfn_t gfn) |
1196 | struct kvm_memory_slot *slot, gfn_t gfn) | ||
1197 | { | 1196 | { |
1198 | unsigned long addr = gfn_to_hva_memslot(slot, gfn); | 1197 | unsigned long addr = gfn_to_hva_memslot(slot, gfn); |
1199 | return hva_to_pfn(kvm, addr, false, NULL, true, NULL); | 1198 | return hva_to_pfn(addr, false, NULL, true, NULL); |
1200 | } | 1199 | } |
1201 | 1200 | ||
1202 | int gfn_to_page_many_atomic(struct kvm *kvm, gfn_t gfn, struct page **pages, | 1201 | int gfn_to_page_many_atomic(struct kvm *kvm, gfn_t gfn, struct page **pages, |