Skip to content

Commit 5fc8f70

Browse files
jan-kiszkarafaeljw
authored andcommitted
intel_pstate: Fix MSR_CONFIG_TDP_x addressing in core_get_max_pstate()
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>
1 parent 8257736 commit 5fc8f70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/cpufreq/intel_pstate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ static int core_get_max_pstate(void)
945945
if (err)
946946
goto skip_tar;
947947

948-
tdp_msr = MSR_CONFIG_TDP_NOMINAL + tdp_ctrl;
948+
tdp_msr = MSR_CONFIG_TDP_NOMINAL + (tdp_ctrl & 0x3);
949949
err = rdmsrl_safe(tdp_msr, &tdp_ratio);
950950
if (err)
951951
goto skip_tar;

0 commit comments

Comments
 (0)