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: <9e738ae8-8209-f194-9d4e-692c8b107ba5@loongson.cn>
Date: Thu, 22 Feb 2024 19:59:11 +0800
From: maobibo <maobibo@...ngson.cn>
To: WANG Xuerui <kernel@...0n.name>, Paolo Bonzini <pbonzini@...hat.com>,
 Huacai Chen <chenhuacai@...nel.org>
Cc: Tianrui Zhao <zhaotianrui@...ngson.cn>, kvm@...r.kernel.org,
 loongarch@...ts.linux.dev, linux-kernel@...r.kernel.org,
 WANG Xuerui <git@...0n.name>
Subject: Re: [PATCH for-6.8 v4 2/3] LoongArch: KVM: Rename _kvm_get_cpucfg to
 _kvm_get_cpucfg_mask



On 2024/2/22 下午6:51, WANG Xuerui wrote:
> From: WANG Xuerui <git@...0n.name>
> 
> The function is not actually a getter of guest CPUCFG, but rather
> validation of the input CPUCFG ID plus information about the supported
> bit flags of that CPUCFG leaf. So rename it to avoid confusion.
> 
> Signed-off-by: WANG Xuerui <git@...0n.name>
> ---
>   arch/loongarch/kvm/vcpu.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/loongarch/kvm/vcpu.c b/arch/loongarch/kvm/vcpu.c
> index 7fd32de6656b..9f63bbaf19c1 100644
> --- a/arch/loongarch/kvm/vcpu.c
> +++ b/arch/loongarch/kvm/vcpu.c
> @@ -298,7 +298,7 @@ static int _kvm_setcsr(struct kvm_vcpu *vcpu, unsigned int id, u64 val)
>   	return ret;
>   }
>   
> -static int _kvm_get_cpucfg(int id, u64 *v)
> +static int _kvm_get_cpucfg_mask(int id, u64 *v)
>   {
>   	if (id < 0 || id >= KVM_MAX_CPUCFG_REGS)
>   		return -EINVAL;
> @@ -339,7 +339,7 @@ static int kvm_check_cpucfg(int id, u64 val)
>   	u64 mask = 0;
>   	int ret;
>   
> -	ret = _kvm_get_cpucfg(id, &mask);
> +	ret = _kvm_get_cpucfg_mask(id, &mask);
>   	if (ret)
>   		return ret;
>   
> @@ -567,7 +567,7 @@ static int kvm_loongarch_get_cpucfg_attr(struct kvm_vcpu *vcpu,
>   	uint64_t val;
>   	uint64_t __user *uaddr = (uint64_t __user *)attr->addr;
>   
> -	ret = _kvm_get_cpucfg(attr->attr, &val);
> +	ret = _kvm_get_cpucfg_mask(attr->attr, &val);
>   	if (ret)
>   		return ret;
>   
> 
Reviewed-by: Bibo Mao <maobibo@...ngson.cn>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ