x86/cpufreq: use host CPU policy for Turbo checking

There's no need to invoke CPUID yet another time - we assume symmetry
anyway. With symmetry assumed, logging per-CPU also isn't very useful.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>
This commit is contained in:
Jan Beulich committed 2026-01-20 09:01:50 +01:00
1 parent 894bd76179
commit dc4d5f1ef6
2 files changed
+5 -7

No files matched your search

+4 -7
View File
@@ -220,14 +220,11 @@ static unsigned int cf_check get_cur_freq_on_cpu(unsigned int cpu)
void intel_feature_detect(struct cpufreq_policy *policy)
{
unsigned int eax;
eax = cpuid_eax(6);
if (eax & 0x2) {
if ( cpu_has_turbo_boost )
{
policy->turbo = CPUFREQ_TURBO_ENABLED;
if (cpufreq_verbose)
printk(XENLOG_INFO "CPU%u: Turbo Mode detected and enabled\n",
smp_processor_id());
if ( cpufreq_verbose )
printk_once(XENLOG_INFO "Turbo Mode detected and enabled\n");
}
}
+1
View File
@@ -177,6 +177,7 @@ static inline bool boot_cpu_has(unsigned int feat)
#define cpu_has_tbm boot_cpu_has(X86_FEATURE_TBM)
/* CPUID level 0x00000006.eax */
#define cpu_has_turbo_boost host_cpu_policy.basic.turbo_boost
#define cpu_has_arat host_cpu_policy.basic.arat
/* CPUID level 0x00000006.ecx */
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.