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:   Mon, 7 Nov 2022 18:01:44 +0800
From:   Fei Li <fei1.li@...el.com>
To:     <linux-kernel@...r.kernel.org>, <x86@...nel.org>,
        <peterz@...radead.org>
CC:     <dave.hansen@...el.com>, <gregkh@...uxfoundation.org>,
        <tglx@...utronix.de>, <mingo@...hat.com>, <bp@...en8.de>,
        <dave.hansen@...ux.intel.com>, <hpa@...or.com>,
        <Yu1.Wang@...el.com>, <conghui.chen@...el.com>,
        <fengwei.yin@...el.com>
Subject: Re: [PATCH v2] x86/acrn: Set X86_FEATURE_TSC_KNOWN_FREQ

On 2022-11-01 at 13:30:19 +0800, Fei Li wrote:
> If the TSC frequency is known from the acrn_get_tsc_khz(),
> the TSC frequency does not need to be recalibrated.
> 
> Avoiding recalibration by setting X86_FEATURE_TSC_KNOWN_FREQ.
> This patch also removes `inline` for acrn_get_tsc_khz() since
> it doesn't make sense.
> 
> Signed-off-by: Fei Li <fei1.li@...el.com>
> Reviewed-by: Yin, Fengwei <fengwei.yin@...el.com>
> 
> ---
> v2:
> - Detail the commit message

Ping ...

> ---
>  arch/x86/include/asm/acrn.h | 5 -----
>  arch/x86/kernel/cpu/acrn.c  | 6 ++++++
>  2 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/x86/include/asm/acrn.h b/arch/x86/include/asm/acrn.h
> index 1dd14381bcb6..aa12c74ea959 100644
> --- a/arch/x86/include/asm/acrn.h
> +++ b/arch/x86/include/asm/acrn.h
> @@ -30,11 +30,6 @@ static inline u32 acrn_cpuid_base(void)
>  	return 0;
>  }
>  
> -static inline unsigned long acrn_get_tsc_khz(void)
> -{
> -	return cpuid_eax(ACRN_CPUID_TIMING_INFO);
> -}
> -
>  /*
>   * Hypercalls for ACRN
>   *
> diff --git a/arch/x86/kernel/cpu/acrn.c b/arch/x86/kernel/cpu/acrn.c
> index 485441b7f030..c5ff75b6a949 100644
> --- a/arch/x86/kernel/cpu/acrn.c
> +++ b/arch/x86/kernel/cpu/acrn.c
> @@ -24,6 +24,12 @@ static u32 __init acrn_detect(void)
>  	return acrn_cpuid_base();
>  }
>  
> +static unsigned long acrn_get_tsc_khz(void)
> +{
> +	setup_force_cpu_cap(X86_FEATURE_TSC_KNOWN_FREQ);
> +	return cpuid_eax(ACRN_CPUID_TIMING_INFO);
> +}
> +
>  static void __init acrn_init_platform(void)
>  {
>  	/* Setup the IDT for ACRN hypervisor callback */
> 
> base-commit: 5aaef24b5c6d4246b2cac1be949869fa36577737
> -- 
> 2.34.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ