Skip to content

Commit

Permalink
intel_pstate: Fix MSR_CONFIG_TDP_x addressing in core_get_max_pstate()
Browse files Browse the repository at this point in the history
If MSR_CONFIG_TDP_CONTROL is locked, we currently try to address some
MSR 0x80000648 or so. Mask out the relevant level bits 0 and 1.

Found while running over the Jailhouse hypervisor which became upset
about this strange MSR index.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: 4.4+ <stable@vger.kernel.org> # 4.4+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Jan Kiszka authored and Rafael J. Wysocki committed Jul 11, 2016
1 parent 8257736 commit 5fc8f70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/cpufreq/intel_pstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ static int core_get_max_pstate(void)
if (err)
goto skip_tar;

tdp_msr = MSR_CONFIG_TDP_NOMINAL + tdp_ctrl;
tdp_msr = MSR_CONFIG_TDP_NOMINAL + (tdp_ctrl & 0x3);
err = rdmsrl_safe(tdp_msr, &tdp_ratio);
if (err)
goto skip_tar;
Expand Down

0 comments on commit 5fc8f70

Please sign in to comment.