From: Anthony PERARD <anthony@xenproject.org>
To: Penny Zheng <Penny.Zheng@amd.com>
Cc: xen-devel@lists.xenproject.org, ray.huang@amd.com,
"Anthony PERARD" <anthony.perard@vates.tech>,
"Juergen Gross" <jgross@suse.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Michal Orzel" <michal.orzel@amd.com>,
"Jan Beulich" <jbeulich@suse.com>,
"Julien Grall" <julien@xen.org>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Stefano Stabellini" <sstabellini@kernel.org>
Subject: Re: [PATCH v7 11/13] tools/cpufreq: extract CPPC para from cpufreq para
Date: Wed, 27 Aug 2025 17:22:29 +0200 [thread overview]
Message-ID: <aK8itT5YOUkY21n1@l14> (raw)
In-Reply-To: <20250822105218.3601273-12-Penny.Zheng@amd.com>
On Fri, Aug 22, 2025 at 06:52:16PM +0800, Penny Zheng wrote:
> diff --git a/tools/misc/xenpm.c b/tools/misc/xenpm.c
> index 6b054b10a4..8fc1d7cc65 100644
> --- a/tools/misc/xenpm.c
> +++ b/tools/misc/xenpm.c
> @@ -898,6 +900,23 @@ static void print_cpufreq_para(int cpuid, struct xc_get_cpufreq_para *p_cpufreq)
> printf("\n");
> }
>
> +/* show cpu cppc parameters information on CPU cpuid */
> +static int show_cppc_para_by_cpuid(xc_interface *xc_handle, unsigned int cpuid)
> +{
> + int ret;
> + xc_cppc_para_t cppc_para;
> +
> + ret = xc_get_cppc_para(xc_handle, cpuid, &cppc_para);
> + if ( !ret )
> + print_cppc_para(cpuid, &cppc_para);
> + else if ( errno == ENODEV )
> + ret = 0; /* Ignore unsupported platform */
> + else
> + fprintf(stderr, "[CPU%u] failed to get cppc parameter\n", cpuid);
You might want to add ": %s" strerror(errno) to the error printed, which
could help figure out why we failed to get the parameters.
The rest of the tool side of the patch, with Jan suggestion, looks good
to me, so Acked-by: Anthony PERARD <anthony.perard@vates.tech> for the
next round.
Thanks,
--
Anthony PERARD
next prev parent reply other threads:[~2025-08-27 15:22 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-22 10:52 [PATCH v7 00/13] amd-cppc CPU Performance Scaling Driver Penny Zheng
2025-08-22 10:52 ` [PATCH v7 01/13] tools: drop "has_num" condition check for cppc mode Penny Zheng
2025-08-22 10:52 ` [PATCH v7 02/13] cpufreq: rename "xen_cppc_para" to "xen_get_cppc_para" Penny Zheng
2025-08-22 10:52 ` [PATCH v7 03/13] tools: fix help info for "xenpm set-cpufreq-cppc" Penny Zheng
2025-08-25 14:30 ` Jan Beulich
2025-08-22 10:52 ` [PATCH v7 04/13] xen/cpufreq: add missing default: case for x86 vendor Penny Zheng
2025-08-25 14:43 ` Jan Beulich
2025-08-26 4:23 ` Penny, Zheng
2025-08-22 10:52 ` [PATCH v7 05/13] xen/cpufreq: refactor cmdline "cpufreq=xxx" Penny Zheng
2025-08-25 14:45 ` Jan Beulich
2025-08-26 7:38 ` Jan Beulich
2025-08-22 10:52 ` [PATCH v7 06/13] xen/cpufreq: introduce new sub-hypercall to propagate CPPC data Penny Zheng
2025-08-25 15:01 ` Jan Beulich
2025-08-26 5:53 ` Penny, Zheng
2025-08-26 5:58 ` Jan Beulich
2025-08-26 6:38 ` Penny, Zheng
2025-08-22 10:52 ` [PATCH v7 07/13] xen/cpufreq: introduce "cpufreq=amd-cppc" xen cmdline and amd-cppc driver Penny Zheng
2025-08-25 15:07 ` Jan Beulich
2025-08-22 10:52 ` [PATCH v7 08/13] xen/cpufreq: implement amd-cppc driver for CPPC in passive mode Penny Zheng
2025-08-25 15:14 ` Jan Beulich
2025-08-22 10:52 ` [PATCH v7 09/13] xen/cpufreq: implement amd-cppc-epp driver for CPPC in active mode Penny Zheng
2025-08-25 15:19 ` Jan Beulich
2025-08-22 10:52 ` [PATCH v7 10/13] xen/cpufreq: get performance policy from governor set via xenpm Penny Zheng
2025-08-25 15:23 ` Jan Beulich
2025-08-22 10:52 ` [PATCH v7 11/13] tools/cpufreq: extract CPPC para from cpufreq para Penny Zheng
2025-08-25 15:36 ` Jan Beulich
2025-08-26 8:21 ` Penny, Zheng
2025-08-26 8:32 ` Jan Beulich
2025-08-26 9:12 ` Penny, Zheng
2025-08-27 15:22 ` Anthony PERARD [this message]
2025-08-28 4:14 ` Penny, Zheng
2025-08-22 10:52 ` [PATCH v7 12/13] xen/cpufreq: bypass governor-related para for amd-cppc-epp Penny Zheng
2025-08-25 15:44 ` Jan Beulich
2025-08-22 10:52 ` [PATCH v7 13/13] xen/cpufreq: Adapt SET/GET_CPUFREQ_CPPC xen_sysctl_pm_op for amd-cppc driver Penny Zheng
2025-08-25 16:02 ` Jan Beulich
2025-08-28 4:06 ` Penny, Zheng
2025-08-28 6:35 ` Jan Beulich
2025-08-28 6:37 ` Jan Beulich
2025-08-28 6:54 ` Penny, Zheng
2025-08-28 7:09 ` Jan Beulich
2025-08-28 7:52 ` Penny, Zheng
2025-08-27 15:58 ` Anthony PERARD
2025-08-27 16:08 ` Jan Beulich
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=aK8itT5YOUkY21n1@l14 \
--to=anthony@xenproject.org \
--cc=Penny.Zheng@amd.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=ray.huang@amd.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.