Commit 6b18493d authored by Xiao Guangrong's avatar Xiao Guangrong Committed by Avi Kivity

KVM: MMU: remove unused parameter in mmu_parent_walk()

'vcpu' is unused, remove it
Signed-off-by: default avatarXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
parent 0571d366
...@@ -173,7 +173,7 @@ struct kvm_shadow_walk_iterator { ...@@ -173,7 +173,7 @@ struct kvm_shadow_walk_iterator {
shadow_walk_okay(&(_walker)); \ shadow_walk_okay(&(_walker)); \
shadow_walk_next(&(_walker))) shadow_walk_next(&(_walker)))
typedef int (*mmu_parent_walk_fn) (struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp); typedef int (*mmu_parent_walk_fn) (struct kvm_mmu_page *sp);
static struct kmem_cache *pte_chain_cache; static struct kmem_cache *pte_chain_cache;
static struct kmem_cache *rmap_desc_cache; static struct kmem_cache *rmap_desc_cache;
...@@ -1001,8 +1001,7 @@ static void mmu_page_remove_parent_pte(struct kvm_mmu_page *sp, ...@@ -1001,8 +1001,7 @@ static void mmu_page_remove_parent_pte(struct kvm_mmu_page *sp,
} }
static void mmu_parent_walk(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp, static void mmu_parent_walk(struct kvm_mmu_page *sp, mmu_parent_walk_fn fn)
mmu_parent_walk_fn fn)
{ {
struct kvm_pte_chain *pte_chain; struct kvm_pte_chain *pte_chain;
struct hlist_node *node; struct hlist_node *node;
...@@ -1011,8 +1010,8 @@ static void mmu_parent_walk(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp, ...@@ -1011,8 +1010,8 @@ static void mmu_parent_walk(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp,
if (!sp->multimapped && sp->parent_pte) { if (!sp->multimapped && sp->parent_pte) {
parent_sp = page_header(__pa(sp->parent_pte)); parent_sp = page_header(__pa(sp->parent_pte));
fn(vcpu, parent_sp); fn(parent_sp);
mmu_parent_walk(vcpu, parent_sp, fn); mmu_parent_walk(parent_sp, fn);
return; return;
} }
hlist_for_each_entry(pte_chain, node, &sp->parent_ptes, link) 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,8 +1019,8 @@ static void mmu_parent_walk(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp,
if (!pte_chain->parent_ptes[i]) if (!pte_chain->parent_ptes[i])
break; break;
parent_sp = page_header(__pa(pte_chain->parent_ptes[i])); parent_sp = page_header(__pa(pte_chain->parent_ptes[i]));
fn(vcpu, parent_sp); fn(parent_sp);
mmu_parent_walk(vcpu, parent_sp, fn); mmu_parent_walk(parent_sp, fn);
} }
} }
...@@ -1058,16 +1057,15 @@ static void kvm_mmu_update_parents_unsync(struct kvm_mmu_page *sp) ...@@ -1058,16 +1057,15 @@ static void kvm_mmu_update_parents_unsync(struct kvm_mmu_page *sp)
} }
} }
static int unsync_walk_fn(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp) static int unsync_walk_fn(struct kvm_mmu_page *sp)
{ {
kvm_mmu_update_parents_unsync(sp); kvm_mmu_update_parents_unsync(sp);
return 1; return 1;
} }
static void kvm_mmu_mark_parents_unsync(struct kvm_vcpu *vcpu, static void kvm_mmu_mark_parents_unsync(struct kvm_mmu_page *sp)
struct kvm_mmu_page *sp)
{ {
mmu_parent_walk(vcpu, sp, unsync_walk_fn); mmu_parent_walk(sp, unsync_walk_fn);
kvm_mmu_update_parents_unsync(sp); kvm_mmu_update_parents_unsync(sp);
} }
...@@ -1345,7 +1343,7 @@ static struct kvm_mmu_page *kvm_mmu_get_page(struct kvm_vcpu *vcpu, ...@@ -1345,7 +1343,7 @@ static struct kvm_mmu_page *kvm_mmu_get_page(struct kvm_vcpu *vcpu,
mmu_page_add_parent_pte(vcpu, sp, parent_pte); mmu_page_add_parent_pte(vcpu, sp, parent_pte);
if (sp->unsync_children) { if (sp->unsync_children) {
set_bit(KVM_REQ_MMU_SYNC, &vcpu->requests); set_bit(KVM_REQ_MMU_SYNC, &vcpu->requests);
kvm_mmu_mark_parents_unsync(vcpu, sp); kvm_mmu_mark_parents_unsync(sp);
} }
trace_kvm_mmu_get_page(sp, false); trace_kvm_mmu_get_page(sp, false);
return sp; return sp;
...@@ -1759,7 +1757,7 @@ static int kvm_unsync_page(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp) ...@@ -1759,7 +1757,7 @@ static int kvm_unsync_page(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp)
++vcpu->kvm->stat.mmu_unsync; ++vcpu->kvm->stat.mmu_unsync;
sp->unsync = 1; sp->unsync = 1;
kvm_mmu_mark_parents_unsync(vcpu, sp); kvm_mmu_mark_parents_unsync(sp);
mmu_convert_notrap(sp); mmu_convert_notrap(sp);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment