x86/platform: Expose DTS sensors MSR

Intel provide CPU sensors through "DTS" MSRs. As these MSR are core-specific
(or package-specific), we can't reliably fetch them from Dom0 directly.
Expose these MSR (if supported) through XENPF_resource_op so that it is
accessible through hypercall.

Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Teddy Astie <teddy.astie@vates.tech>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Teddy Astie authored and Jan Beulich committed 2026-01-20 09:02:39 +01:00
1 parent 89c461242d
commit 615c9f3f82
3 files changed
+10 -1

No files matched your search

+3
View File
@@ -115,6 +115,9 @@
#define MCU_OPT_CTRL_GDS_MIT_DIS (_AC(1, ULL) << 4) #define MCU_OPT_CTRL_GDS_MIT_DIS (_AC(1, ULL) << 4)
#define MCU_OPT_CTRL_GDS_MIT_LOCK (_AC(1, ULL) << 5) #define MCU_OPT_CTRL_GDS_MIT_LOCK (_AC(1, ULL) << 5)
#define MSR_TEMPERATURE_TARGET 0x000001a2
#define MSR_PACKAGE_THERM_STATUS 0x000001b1
#define MSR_FRED_RSP_SL0 0x000001cc #define MSR_FRED_RSP_SL0 0x000001cc
#define MSR_FRED_RSP_SL1 0x000001cd #define MSR_FRED_RSP_SL1 0x000001cd
#define MSR_FRED_RSP_SL2 0x000001ce #define MSR_FRED_RSP_SL2 0x000001ce
+6
View File
@@ -27,6 +27,7 @@
#include <asm/current.h> #include <asm/current.h>
#include <public/platform.h> #include <public/platform.h>
#include <acpi/cpufreq/processor_perf.h> #include <acpi/cpufreq/processor_perf.h>
#include <asm/cpu-policy.h>
#include <asm/edd.h> #include <asm/edd.h>
#include <asm/microcode.h> #include <asm/microcode.h>
#include <asm/mtrr.h> #include <asm/mtrr.h>
@@ -86,6 +87,11 @@ static bool msr_read_allowed(unsigned int msr)
case MSR_MCU_OPT_CTRL: case MSR_MCU_OPT_CTRL:
return cpu_has_srbds_ctrl; return cpu_has_srbds_ctrl;
case MSR_IA32_THERM_STATUS:
case MSR_TEMPERATURE_TARGET:
case MSR_PACKAGE_THERM_STATUS:
return host_cpu_policy.basic.digital_temp_sensor;
} }
if ( ppin_msr && msr == ppin_msr ) if ( ppin_msr && msr == ppin_msr )
+1 -1
View File
@@ -126,7 +126,7 @@ struct cpu_policy
union { union {
uint32_t _6a; uint32_t _6a;
struct { struct {
bool :1, bool digital_temp_sensor:1,
turbo_boost:1, turbo_boost:1,
arat:1, arat:1,
:1, :1,
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.