From: Jan Beulich <jbeulich@suse.com>
To: Teddy Astie <teddy.astie@vates.tech>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
"Roger Pau Monné" <roger.pau@citrix.com>,
xen-devel@lists.xenproject.org
Subject: Re: [RFC PATCH for-4.22 1/2] x86/platform: Expose DTS sensors MSR
Date: Tue, 28 Oct 2025 10:22:44 +0100 [thread overview]
Message-ID: <30131a50-d4fb-4c42-915a-be44b62752fa@suse.com> (raw)
In-Reply-To: <48b15617f248852560a0e0674eea65d25330c605.1761585640.git.teddy.astie@vates.tech>
On 27.10.2025 18:26, Teddy Astie wrote:
> Intel provide CPU sensors through "DTS" MSRs. As there 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>
> ---
> I'm not a fan of doing a inline cpuid check here, but I don't have a
> better approach in mind.
>
> xen/arch/x86/include/asm/msr-index.h | 2 ++
> xen/arch/x86/platform_hypercall.c | 6 ++++++
> 2 files changed, 8 insertions(+)
>
> diff --git a/xen/arch/x86/include/asm/msr-index.h b/xen/arch/x86/include/asm/msr-index.h
> index df52587c85..98dda629e5 100644
> --- a/xen/arch/x86/include/asm/msr-index.h
> +++ b/xen/arch/x86/include/asm/msr-index.h
> @@ -510,6 +510,8 @@
> #define MSR_IA32_THERM_INTERRUPT 0x0000019b
> #define MSR_IA32_THERM_STATUS 0x0000019c
> #define MSR_IA32_MISC_ENABLE 0x000001a0
> +#define MSR_IA32_TEMPERATURE_TARGET 0x000001a2
> +#define MSR_IA32_PACKAGE_THERM_STATUS 0x000001b1
> #define MSR_IA32_MISC_ENABLE_FAST_STRING (1<<0)
> #define MSR_IA32_MISC_ENABLE_PERF_AVAIL (1<<7)
> #define MSR_IA32_MISC_ENABLE_BTS_UNAVAIL (1<<11)
Now new additions like this to this file please (and even less so ones
disagreeing in padding with adjacent lines). Please go find this comment
in the file:
/*
* Legacy MSR constants in need of cleanup. No new MSRs below this comment.
*/
Jan
prev parent reply other threads:[~2025-10-28 9:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-27 17:26 [RFC PATCH for-4.22 0/2] Support for Intel temperature sensors (DTS) Teddy Astie
2025-10-27 17:26 ` [RFC PATCH for-4.22 2/2] tools: Introduce xen-inteltemp tool Teddy Astie
2025-10-28 9:24 ` Jan Beulich
2025-10-27 17:26 ` [RFC PATCH for-4.22 1/2] x86/platform: Expose DTS sensors MSR Teddy Astie
2025-10-27 19:38 ` Andrew Cooper
2025-10-28 9:20 ` Jan Beulich
2025-10-29 16:06 ` Andrew Cooper
2025-10-30 7:07 ` Jan Beulich
2025-10-28 9:22 ` Jan Beulich [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=30131a50-d4fb-4c42-915a-be44b62752fa@suse.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=roger.pau@citrix.com \
--cc=teddy.astie@vates.tech \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).