Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

cpufreq / intel_pstate: Do not load on VM that does not report max P …


It seems some VMs support the P state MSRs but return zeros. Fail
gracefully if we are running in this environment.

Reported-by: Josh Boyer <>
Signed-off-by: Dirk Brandewie <>
Acked-by: Viresh Kumar <>
Signed-off-by: Rafael J. Wysocki <>
  • Loading branch information...
commit d3929b832833db870af72479666fa4e4d043e02e 1 parent 907cc90
@dirk-brandewie dirk-brandewie authored Rafael J. Wysocki committed
Showing with 3 additions and 0 deletions.
  1. +3 −0  drivers/cpufreq/intel_pstate.c
3  drivers/cpufreq/intel_pstate.c
@@ -662,6 +662,9 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy)
cpu = all_cpu_data[policy->cpu];
+ if (!policy->cpuinfo.max_freq)
+ return -ENODEV;
intel_pstate_get_min_max(cpu, &min, &max);
limits.min_perf_pct = (policy->min * 100) / policy->cpuinfo.max_freq;
Please sign in to comment.
Something went wrong with that request. Please try again.