aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/mmu.c
diff options
context:
space:
mode:
authorXiao Guangrong <xiaoguangrong@cn.fujitsu.com>2010-04-16 09:29:17 -0400
committerAvi Kivity <avi@redhat.com>2010-05-17 05:17:53 -0400
commit6b18493d60e7f54a0feb771fa141b5fcb72ce1e4 (patch)
tree7ed0250be3a93a0a2f4384ec25821e5ecb589305 /arch/x86/kvm/mmu.c
parent0571d366e0be571be14581cb5e28d9c3f6e0d0b1 (diff)
KVM: MMU: remove unused parameter in mmu_parent_walk()
'vcpu' is unused, remove it Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm/mmu.c')
-rw-r--r--arch/x86/kvm/mmu.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index b57be03d442c..45f3aa5213c5 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -173,7 +173,7 @@ struct kvm_shadow_walk_iterator {
173 shadow_walk_okay(&(_walker)); \ 173 shadow_walk_okay(&(_walker)); \
174 shadow_walk_next(&(_walker))) 174 shadow_walk_next(&(_walker)))
175 175
176typedef int (*mmu_parent_walk_fn) (struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp); 176typedef int (*mmu_parent_walk_fn) (struct kvm_mmu_page *sp);
177 177
178static struct kmem_cache *pte_chain_cache; 178static struct kmem_cache *pte_chain_cache;
179static struct kmem_cache *rmap_desc_cache; 179static struct kmem_cache *rmap_desc_cache;
@@ -1001,8 +1001,7 @@ static void mmu_page_remove_parent_pte(struct kvm_mmu_page *sp,
1001} 1001}
1002 1002
1003 1003
1004static void mmu_parent_walk(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp, 1004static void mmu_parent_walk(struct kvm_mmu_page *sp, mmu_parent_walk_fn fn)
1005 mmu_parent_walk_fn fn)
1006{ 1005{
1007 struct kvm_pte_chain *pte_chain; 1006 struct kvm_pte_chain *pte_chain;
1008 struct hlist_node *node; 1007 struct hlist_node *node;
@@ -1011,8 +1010,8 @@ static void mmu_parent_walk(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp,
1011 1010
1012 if (!sp->multimapped && sp->parent_pte) { 1011 if (!sp->multimapped && sp->parent_pte) {
1013 parent_sp = page_header(__pa(sp->parent_pte)); 1012 parent_sp = page_header(__pa(sp->parent_pte));
1014 fn(vcpu, parent_sp); 1013 fn(parent_sp);
1015 mmu_parent_walk(vcpu, parent_sp, fn); 1014 mmu_parent_walk(parent_sp, fn);
1016 return; 1015 return;
1017 } 1016 }
1018 hlist_for_each_entry(pte_chain, node, &sp->parent_ptes, link) 1017 hlist_for_each_entry(pte_chain, node, &sp->parent_ptes, link)
@@ -1020,8 +1019,8 @@ static void mmu_parent_walk(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp,
1020 if (!pte_chain->parent_ptes[i]) 1019 if (!pte_chain->parent_ptes[i])
1021 break; 1020 break;
1022 parent_sp = page_header(__pa(pte_chain->parent_ptes[i])); 1021 parent_sp = page_header(__pa(pte_chain->parent_ptes[i]));
1023 fn(vcpu, parent_sp); 1022 fn(parent_sp);
1024 mmu_parent_walk(vcpu, parent_sp, fn); 1023 mmu_parent_walk(parent_sp, fn);
1025 } 1024 }
1026} 1025}
1027 1026
@@ -1058,16 +1057,15 @@ static void kvm_mmu_update_parents_unsync(struct kvm_mmu_page *sp)
1058 } 1057 }
1059} 1058}
1060 1059
1061static int unsync_walk_fn(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp) 1060static int unsync_walk_fn(struct kvm_mmu_page *sp)
1062{ 1061{
1063 kvm_mmu_update_parents_unsync(sp); 1062 kvm_mmu_update_parents_unsync(sp);
1064 return 1; 1063 return 1;
1065} 1064}
1066 1065
1067static void kvm_mmu_mark_parents_unsync(struct kvm_vcpu *vcpu, 1066static void kvm_mmu_mark_parents_unsync(struct kvm_mmu_page *sp)
1068 struct kvm_mmu_page *sp)
1069{ 1067{
1070 mmu_parent_walk(vcpu, sp, unsync_walk_fn); 1068 mmu_parent_walk(sp, unsync_walk_fn);
1071 kvm_mmu_update_parents_unsync(sp); 1069 kvm_mmu_update_parents_unsync(sp);
1072} 1070}
1073 1071
@@ -1345,7 +1343,7 @@ static struct kvm_mmu_page *kvm_mmu_get_page(struct kvm_vcpu *vcpu,
1345 mmu_page_add_parent_pte(vcpu, sp, parent_pte); 1343 mmu_page_add_parent_pte(vcpu, sp, parent_pte);
1346 if (sp->unsync_children) { 1344 if (sp->unsync_children) {
1347 set_bit(KVM_REQ_MMU_SYNC, &vcpu->requests); 1345 set_bit(KVM_REQ_MMU_SYNC, &vcpu->requests);
1348 kvm_mmu_mark_parents_unsync(vcpu, sp); 1346 kvm_mmu_mark_parents_unsync(sp);
1349 } 1347 }
1350 trace_kvm_mmu_get_page(sp, false); 1348 trace_kvm_mmu_get_page(sp, false);
1351 return sp; 1349 return sp;
@@ -1759,7 +1757,7 @@ static int kvm_unsync_page(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp)
1759 ++vcpu->kvm->stat.mmu_unsync; 1757 ++vcpu->kvm->stat.mmu_unsync;
1760 sp->unsync = 1; 1758 sp->unsync = 1;
1761 1759
1762 kvm_mmu_mark_parents_unsync(vcpu, sp); 1760 kvm_mmu_mark_parents_unsync(sp);
1763 1761
1764 mmu_convert_notrap(sp); 1762 mmu_convert_notrap(sp);
1765 return 0; 1763 return 0;