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: <20240618090836.GBZnFOlFurqQiLeI7a@fat_crate.local>
Date: Tue, 18 Jun 2024 11:08:36 +0200
From: Borislav Petkov <bp@...en8.de>
To: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
Cc: rafael@...nel.org, viresh.kumar@...aro.org, tglx@...utronix.de,
	mingo@...hat.com, dave.hansen@...ux.intel.com, hpa@...or.com,
	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
	x86@...nel.org
Subject: Re: [PATCH 2/2] cpufreq: intel_pstate: Support highest performance
 change interrupt

On Mon, Jun 17, 2024 at 08:51:21PM -0700, Srinivas Pandruvada wrote:
> +	status_mask = HWP_GUARANTEED_PERF_CHANGE_STATUS;
> +	if (boot_cpu_has(X86_FEATURE_HWP_HIGHEST_PERF_CHANGE))

s/boot_cpu_has/cpu_feature_enabled/g

> +		status_mask |= HWP_HIGHEST_PERF_CHANGE_STATUS;
> +
>  	rdmsrl_safe(MSR_HWP_STATUS, &value);
> -	if (!(value & 0x01))
> +	if (!(value & status_mask))
>  		return;
>  
>  	spin_lock_irqsave(&hwp_notify_lock, flags);
> @@ -1668,17 +1675,25 @@ static void intel_pstate_disable_hwp_interrupt(struct cpudata *cpudata)
>  		cancel_delayed_work_sync(&cpudata->hwp_notify_work);
>  }
>  
> +#define HWP_GUARANTEED_PERF_CHANGE_REQ BIT(0)
> +#define HWP_HIGHEST_PERF_CHANGE_REQ    BIT(2)
> +
>  static void intel_pstate_enable_hwp_interrupt(struct cpudata *cpudata)
>  {
> -	/* Enable HWP notification interrupt for guaranteed performance change */
> +	/* Enable HWP notification interrupt for performance change */
>  	if (boot_cpu_has(X86_FEATURE_HWP_NOTIFY)) {
> +		u64 interrupt_mask = HWP_GUARANTEED_PERF_CHANGE_REQ;
> +
>  		spin_lock_irq(&hwp_notify_lock);
>  		INIT_DELAYED_WORK(&cpudata->hwp_notify_work, intel_pstate_notify_work);
>  		cpumask_set_cpu(cpudata->cpu, &hwp_intr_enable_mask);
>  		spin_unlock_irq(&hwp_notify_lock);
>  
> +		if (boot_cpu_has(X86_FEATURE_HWP_HIGHEST_PERF_CHANGE))a

Ditto.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ