Commit ad6d6b94 authored by Jinrong Liang's avatar Jinrong Liang Committed by Paolo Bonzini

KVM: x86/tdp_mmu: Remove unused "kvm" of kvm_tdp_mmu_get_root()

The "struct kvm *kvm" parameter of kvm_tdp_mmu_get_root() is not used,
so remove it. No functional change intended.
Signed-off-by: default avatarJinrong Liang <cloudliang@tencent.com>
Message-Id: <20220125095909.38122-5-cloudliang@tencent.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent e8f6e738
...@@ -126,7 +126,7 @@ static struct kvm_mmu_page *tdp_mmu_next_root(struct kvm *kvm, ...@@ -126,7 +126,7 @@ static struct kvm_mmu_page *tdp_mmu_next_root(struct kvm *kvm,
while (next_root) { while (next_root) {
if ((!only_valid || !next_root->role.invalid) && if ((!only_valid || !next_root->role.invalid) &&
kvm_tdp_mmu_get_root(kvm, next_root)) kvm_tdp_mmu_get_root(next_root))
break; break;
next_root = list_next_or_null_rcu(&kvm->arch.tdp_mmu_roots, next_root = list_next_or_null_rcu(&kvm->arch.tdp_mmu_roots,
...@@ -220,7 +220,7 @@ hpa_t kvm_tdp_mmu_get_vcpu_root_hpa(struct kvm_vcpu *vcpu) ...@@ -220,7 +220,7 @@ hpa_t kvm_tdp_mmu_get_vcpu_root_hpa(struct kvm_vcpu *vcpu)
*/ */
for_each_tdp_mmu_root(kvm, root, kvm_mmu_role_as_id(role)) { for_each_tdp_mmu_root(kvm, root, kvm_mmu_role_as_id(role)) {
if (root->role.word == role.word && if (root->role.word == role.word &&
kvm_tdp_mmu_get_root(kvm, root)) kvm_tdp_mmu_get_root(root))
goto out; goto out;
} }
......
...@@ -7,8 +7,7 @@ ...@@ -7,8 +7,7 @@
hpa_t kvm_tdp_mmu_get_vcpu_root_hpa(struct kvm_vcpu *vcpu); hpa_t kvm_tdp_mmu_get_vcpu_root_hpa(struct kvm_vcpu *vcpu);
__must_check static inline bool kvm_tdp_mmu_get_root(struct kvm *kvm, __must_check static inline bool kvm_tdp_mmu_get_root(struct kvm_mmu_page *root)
struct kvm_mmu_page *root)
{ {
return refcount_inc_not_zero(&root->tdp_mmu_root_count); return refcount_inc_not_zero(&root->tdp_mmu_root_count);
} }
......
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