diff mbox series

[07/19] KVM: x86/svm: Remove unused "vcpu" of nested_svm_check_tlb_ctl()

Message ID 20220125095909.38122-8-cloudliang@tencent.com (mailing list archive)
State New, archived
Headers show
Series KVM: x86: Bulk removal of unused function parameters | expand

Commit Message

Jinrong Liang Jan. 25, 2022, 9:58 a.m. UTC
From: Jinrong Liang <cloudliang@tencent.com>

The "struct kvm_vcpu *vcpu" parameter of nested_svm_check_tlb_ctl()
is not used, so remove it. No functional change intended.

Signed-off-by: Jinrong Liang <cloudliang@tencent.com>
---
 arch/x86/kvm/svm/nested.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Paolo Bonzini Jan. 25, 2022, 4:02 p.m. UTC | #1
On 1/25/22 10:58, Jinrong Liang wrote:
> From: Jinrong Liang <cloudliang@tencent.com>
> 
> The "struct kvm_vcpu *vcpu" parameter of nested_svm_check_tlb_ctl()
> is not used, so remove it. No functional change intended.
> 
> Signed-off-by: Jinrong Liang <cloudliang@tencent.com>

This might be useful later if the code needs to check guest CPUID bits. 
  Leaving it in for now.

Paolo

> ---
>   arch/x86/kvm/svm/nested.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c
> index cf206855ebf0..5a1a2678a2b1 100644
> --- a/arch/x86/kvm/svm/nested.c
> +++ b/arch/x86/kvm/svm/nested.c
> @@ -209,7 +209,7 @@ static bool nested_svm_check_bitmap_pa(struct kvm_vcpu *vcpu, u64 pa, u32 size)
>   	    kvm_vcpu_is_legal_gpa(vcpu, addr + size - 1);
>   }
>   
> -static bool nested_svm_check_tlb_ctl(struct kvm_vcpu *vcpu, u8 tlb_ctl)
> +static bool nested_svm_check_tlb_ctl(u8 tlb_ctl)
>   {
>   	/* Nested FLUSHBYASID is not supported yet.  */
>   	switch(tlb_ctl) {
> @@ -240,7 +240,7 @@ static bool __nested_vmcb_check_controls(struct kvm_vcpu *vcpu,
>   					   IOPM_SIZE)))
>   		return false;
>   
> -	if (CC(!nested_svm_check_tlb_ctl(vcpu, control->tlb_ctl)))
> +	if (CC(!nested_svm_check_tlb_ctl(control->tlb_ctl)))
>   		return false;
>   
>   	return true;
diff mbox series

Patch

diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c
index cf206855ebf0..5a1a2678a2b1 100644
--- a/arch/x86/kvm/svm/nested.c
+++ b/arch/x86/kvm/svm/nested.c
@@ -209,7 +209,7 @@  static bool nested_svm_check_bitmap_pa(struct kvm_vcpu *vcpu, u64 pa, u32 size)
 	    kvm_vcpu_is_legal_gpa(vcpu, addr + size - 1);
 }
 
-static bool nested_svm_check_tlb_ctl(struct kvm_vcpu *vcpu, u8 tlb_ctl)
+static bool nested_svm_check_tlb_ctl(u8 tlb_ctl)
 {
 	/* Nested FLUSHBYASID is not supported yet.  */
 	switch(tlb_ctl) {
@@ -240,7 +240,7 @@  static bool __nested_vmcb_check_controls(struct kvm_vcpu *vcpu,
 					   IOPM_SIZE)))
 		return false;
 
-	if (CC(!nested_svm_check_tlb_ctl(vcpu, control->tlb_ctl)))
+	if (CC(!nested_svm_check_tlb_ctl(control->tlb_ctl)))
 		return false;
 
 	return true;