Re: [REGRESSION] Intel Turbo Boost stuck disabled on some Clevo machines (was: [PATCH] cpufreq: intel_pstate: Unchecked MSR aceess in legacy mode)

srinivas pandruvada
2025-11-06T15:23:14Z

[-- Attachment #1: Type: text/plain, Size: 873 bytes --]

Hi Aaron,

On Wed, 2025-09-10 at 15:33 -0500, Aaron Rainbolt wrote:
> On Wed, 10 Sep 2025 10:15:00 -0700
> srinivas pandruvada <srinivas.pandruvada@linux.intel.com> wrote:
>
> > On Wed, 2025-09-10 at 11:36 -0500, Aaron Rainbolt wrote:
> > > On Wed, 30 Apr 2025 16:29:09 +0200
> > > "Rafael J. Wysocki" <rafael@kernel.org> wrote:
> > >
> > > > On Tue, Apr 29, 2025 at 11:07 PM Srinivas Pandruvada
> > > > <srinivas.pandruvada@linux.intel.com> wrote:
> > > > >
> > > > > When turbo mode is unavailable on a Skylake-X system,
> > > > > executing
> > > > > the
> > > > > command:
> > > > > "echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo"
> > > > > results in an unchecked MSR access error: WRMSR to 0x199
> > > > > (attempted to write 0x0000000100001300).
Please try the attached patch, if this address this issue.

Thanks,
Srinivas

[-- Attachment #2: 0001-cpufreq-intel_pstate-Reevaluate-IDA-presence-on-no_t.patch --]
[-- Type: text/x-patch, Size: 1494 bytes --]

From 405d27e871f7bc85a786f84877a35da54c813b39 Mon Sep 17 00:00:00 2001
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date: Wed, 5 Nov 2025 09:57:03 -0800
Subject: [PATCH] cpufreq: intel_pstate: Reevaluate IDA presence on no_turbo
attribute change

If hardware disabled IDA (Intel Dynamic Acceleration technology) feature
before OS boot, turbo mode support will be disabled permanently. In this
case CPUID.06H: EAX[1] reports 0 and attribute
"/sys/devices/system/cpu/intel_pstate/no_turbo" will show "1" and status
can't be changed to "0".

When no_turbo is written with 0, in this case evaluate CPUID.06H: EAX[1]
again. If the feature status is changed to 1 post OS boot then allow to
enable turbo mode.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
---
drivers/cpufreq/intel_pstate.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 43e847e9f741..0ec45a610b45 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -596,10 +596,15 @@ static void intel_pstate_hybrid_hwp_adjust(struct cpudata *cpu)

static bool turbo_is_disabled(void)
{
+ unsigned int eax, ebx, ecx, edx;
u64 misc_en;

- if (!cpu_feature_enabled(X86_FEATURE_IDA))
+ eax = 0;
+ cpuid(6, &eax, &ebx, &ecx, &edx);
+ if (!(eax & BIT(1))) {
+ pr_info("Turbo is disabled\n");
return true;
+ }

rdmsrl(MSR_IA32_MISC_ENABLE, misc_en);

--
2.43.0