xen/powernow: allow using lowest-power P-state
PATCH 1/1 xen/powernow: allow using lowest-power P-state
The MSR field used here indicates the highest numbered valid P-state, not the first invalid one.
Signed-off-by Jan Beulich <[email protected]>
xen/arch/x86/acpi/cpufreq/powernow.c +2 -2
@@ -197,8 +197,8 @@ static int powernow_cpufreq_cpu_init(str data->max_freq = perf->states[0 ].core_frequency *1000 ;/* table init */ -for (i=0 ; i<perf->state_count && i<max_hw_pstate; i++) { -if (i>0 && perf->states[i].core_frequency >= +for (i =0 ; i < perf->state_count && i <= max_hw_pstate; i++) { +if (i >0 && perf->states[i].core_frequency >= data->freq_table[valid_states-1 ].frequency /1000 )continue ;