diff options
| author | Li Zhaoxin <lizhaoxin04@baidu.com> | 2026-11-04 15:01:49 +0800 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-11-04 15:15:49 +0100 |
| commit | 2c0e6f2858d235c99f7ba4621bd176cd67226f00 (patch) | |
| tree | c126eb86d758be708eb07efac337dfd55cec06fa /include/linux/stringify.h | |
| parent | 02e77af824d5be3a94fdd885835a352f90d24c5c (diff) | |
cpufreq: intel_pstate: Use rdmsrq_safe() to read MSR_MISC_PWR_MGMT
Commit ed7cad0504e3 ("cpufreq: intel_pstate: Relocate platform
preference check") moved the intel_pstate_platform_pwr_mgmt_exists()
call to the beginning of intel_pstate_init(), right after the vendor
check, so it now runs before "no_load" (intel_pstate=disable) and the
other checks.
MSR_MISC_PWR_MGMT is model-specific and KVM does not emulate it. In a
KVM guest using a CPU model listed in intel_pstate_cpu_oob_ids[] (for
example "-cpu host" on Emerald Rapids), reading it raises #GP and the
unchecked rdmsrq() emits a warning with a call trace on every boot, even
with intel_pstate=disable:
unchecked MSR access error: RDMSR from 0x1aa at rIP: 0xffffffffa4009342 (native_read_msr+0x2/0x50)
Call Trace:
<TASK>
intel_pstate_platform_pwr_mgmt_exists+0x3b/0x220
intel_pstate_init+0x1e/0x500
do_one_initcall+0x59/0x350
...
Before that commit, such guests typically returned from
intel_pstate_init() earlier, either because of intel_pstate=disable or
because intel_pstate_msrs_not_valid() failed on the zero ratios that
KVM reports in MSR_PLATFORM_INFO by default, so the MSR was not read.
Use rdmsrq_safe() and treat a failing read as "no OOB mode". The
exception fixup already zeroes the result of a failed unchecked read,
so apart from the warning going away there is no functional change.
Fixes: ed7cad0504e3 ("cpufreq: intel_pstate: Relocate platform preference check")
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Li Zhaoxin <lizhaoxin04@baidu.com>
Link: https://patch.msgid.link/20261104070149.41393-1-lizhaoxin04@baidu.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/stringify.h')
0 files changed, 0 insertions, 0 deletions
