lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5c5e274f-a09c-8a90-f7b1-51f969dd4c2d@redhat.com>
Date:   Tue, 25 Jan 2022 17:31:06 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Jinrong Liang <ljr.kernel@...il.com>
Cc:     Xianting Tian <xianting.tian@...ux.alibaba.com>,
        Jim Mattson <jmattson@...gle.com>,
        Sean Christopherson <seanjc@...gle.com>,
        Vitaly Kuznetsov <vkuznets@...hat.com>,
        Wanpeng Li <wanpengli@...cent.com>,
        Joerg Roedel <joro@...tes.org>, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 16/19] KVM: x86: Remove unused "vcpu" of
 kvm_arch_tsc_has_attr()

On 1/25/22 10:59, Jinrong Liang wrote:
> From: Jinrong Liang <cloudliang@...cent.com>
> 
> The "struct kvm_vcpu *vcpu" parameter of kvm_arch_tsc_has_attr()
> is not used, so remove it. No functional change intended.
> 
> Signed-off-by: Jinrong Liang <cloudliang@...cent.com>
> ---
>   arch/x86/kvm/x86.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index df46d0737b85..22b73b918884 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -5003,8 +5003,7 @@ static int kvm_set_guest_paused(struct kvm_vcpu *vcpu)
>   	return 0;
>   }
>   
> -static int kvm_arch_tsc_has_attr(struct kvm_vcpu *vcpu,
> -				 struct kvm_device_attr *attr)
> +static int kvm_arch_tsc_has_attr(struct kvm_device_attr *attr)
>   {
>   	int r;
>   
> @@ -5099,7 +5098,7 @@ static int kvm_vcpu_ioctl_device_attr(struct kvm_vcpu *vcpu,
>   
>   	switch (ioctl) {
>   	case KVM_HAS_DEVICE_ATTR:
> -		r = kvm_arch_tsc_has_attr(vcpu, &attr);
> +		r = kvm_arch_tsc_has_attr(&attr);
>   		break;
>   	case KVM_GET_DEVICE_ATTR:
>   		r = kvm_arch_tsc_get_attr(vcpu, &attr);

I can't make my mind on this.  I think it's better to have the argument 
in case some attributes depend on VM capabilities in the future.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ