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]
Date: Thu, 28 Mar 2024 09:19:52 +0800
From: "Yang, Weijiang" <weijiang.yang@...el.com>
To: Dapeng Mi <dapeng1.mi@...ux.intel.com>
CC: Jim Mattson <jmattson@...gle.com>, Paolo Bonzini <pbonzini@...hat.com>,
	Sean Christopherson <seanjc@...gle.com>, "kvm@...r.kernel.org"
	<kvm@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, Zhenyu Wang <zhenyuw@...ux.intel.com>,
	"Zhang, Xiong Y" <xiong.y.zhang@...el.com>, Mingwei Zhang
	<mizhang@...gle.com>, Like Xu <like.xu.linux@...il.com>, Jinrong Liang
	<cloudliang@...cent.com>, "Mi, Dapeng1" <dapeng1.mi@...el.com>
Subject: Re: [kvm-unit-tests Patch v3 01/11] x86: pmu: Remove duplicate code
 in pmu_init()

On 1/3/2024 11:13 AM, Dapeng Mi wrote:
> From: Xiong Zhang <xiong.y.zhang@...el.com>
>
> There are totally same code in pmu_init() helper, remove the duplicate
> code.
>
> Signed-off-by: Xiong Zhang <xiong.y.zhang@...el.com>
> Signed-off-by: Dapeng Mi <dapeng1.mi@...ux.intel.com>

Jim has already added RB tag for this patch in v2, you may add it here.

> ---
>   lib/x86/pmu.c | 5 -----
>   1 file changed, 5 deletions(-)
>
> diff --git a/lib/x86/pmu.c b/lib/x86/pmu.c
> index 0f2afd650bc9..d06e94553024 100644
> --- a/lib/x86/pmu.c
> +++ b/lib/x86/pmu.c
> @@ -16,11 +16,6 @@ void pmu_init(void)
>   			pmu.fixed_counter_width = (cpuid_10.d >> 5) & 0xff;
>   		}
>   
> -		if (pmu.version > 1) {
> -			pmu.nr_fixed_counters = cpuid_10.d & 0x1f;
> -			pmu.fixed_counter_width = (cpuid_10.d >> 5) & 0xff;
> -		}
> -
>   		pmu.nr_gp_counters = (cpuid_10.a >> 8) & 0xff;
>   		pmu.gp_counter_width = (cpuid_10.a >> 16) & 0xff;
>   		pmu.gp_counter_mask_length = (cpuid_10.a >> 24) & 0xff;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ