From: Xiaoyao Li <xiaoyao.li@intel.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: Markus Armbruster <armbru@redhat.com>,
Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
Eric Blake <eblake@redhat.com>,
Yanan Wang <wangyanan55@huawei.com>,
Eduardo Habkost <eduardo@habkost.net>,
Zhao Liu <zhao1.liu@intel.com>,
Richard Henderson <richard.henderson@linaro.org>
Subject: Re: [PATCH-for-10.1 v7 2/2] hw/core/machine: Display CPU model name in 'info cpus' command
Date: Tue, 15 Jul 2025 17:30:58 +0800 [thread overview]
Message-ID: <f08283bd-51b7-44a0-821c-544107f46dfa@intel.com> (raw)
In-Reply-To: <20250715090624.52377-3-philmd@linaro.org>
On 7/15/2025 5:06 PM, Philippe Mathieu-Daudé wrote:
> Display the CPU model in 'info cpus'. Example before:
>
> $ qemu-system-aarch64 -M xlnx-versal-virt -S -monitor stdio
> QEMU 10.0.0 monitor - type 'help' for more information
> (qemu) info cpus
> * CPU #0: thread_id=42924
> CPU #1: thread_id=42924
> CPU #2: thread_id=42924
> CPU #3: thread_id=42924
> (qemu) q
>
> and after:
>
> $ qemu-system-aarch64 -M xlnx-versal-virt -S -monitor stdio
> QEMU 10.0.50 monitor - type 'help' for more information
> (qemu) info cpus
> * CPU #0: thread_id=42916 model=cortex-a72
> CPU #1: thread_id=42916 model=cortex-a72
> CPU #2: thread_id=42916 model=cortex-r5f
> CPU #3: thread_id=42916 model=cortex-r5f
> (qemu)
>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
> Tested-by: Zhao Liu <zhao1.liu@intel.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
IIRC, I gave r-b tag before. Anyway,
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
> ---
> hw/core/machine-hmp-cmds.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/hw/core/machine-hmp-cmds.c b/hw/core/machine-hmp-cmds.c
> index c6325cdcaaa..54b6f5406dc 100644
> --- a/hw/core/machine-hmp-cmds.c
> +++ b/hw/core/machine-hmp-cmds.c
> @@ -32,6 +32,7 @@ void hmp_info_cpus(Monitor *mon, const QDict *qdict)
> cpu_list = qmp_query_cpus_fast(NULL);
>
> for (cpu = cpu_list; cpu; cpu = cpu->next) {
> + g_autofree char *cpu_model = cpu_model_from_type(cpu->value->qom_type);
> int active = ' ';
>
> if (cpu->value->cpu_index == monitor_get_cpu_index(mon)) {
> @@ -40,7 +41,8 @@ void hmp_info_cpus(Monitor *mon, const QDict *qdict)
>
> monitor_printf(mon, "%c CPU #%" PRId64 ":", active,
> cpu->value->cpu_index);
> - monitor_printf(mon, " thread_id=%" PRId64 "\n", cpu->value->thread_id);
> + monitor_printf(mon, " thread_id=%" PRId64 " model=%s\n",
> + cpu->value->thread_id, cpu_model);
> }
>
> qapi_free_CpuInfoFastList(cpu_list);
next prev parent reply other threads:[~2025-07-15 9:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-15 9:06 [PATCH-for-10.1 v7 0/2] hw/core/machine: Display CPU model name in 'info cpus' command Philippe Mathieu-Daudé
2025-07-15 9:06 ` [PATCH-for-10.1 v7 1/2] qapi/machine: Add @qom-type field to CpuInfoFast structure Philippe Mathieu-Daudé
2025-07-15 9:30 ` Xiaoyao Li
2025-07-15 9:06 ` [PATCH-for-10.1 v7 2/2] hw/core/machine: Display CPU model name in 'info cpus' command Philippe Mathieu-Daudé
2025-07-15 9:30 ` Xiaoyao Li [this message]
2025-07-15 9:34 ` Philippe Mathieu-Daudé
2025-07-15 19:26 ` [PATCH-for-10.1 v7 0/2] " Philippe Mathieu-Daudé
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=f08283bd-51b7-44a0-821c-544107f46dfa@intel.com \
--to=xiaoyao.li@intel.com \
--cc=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=eduardo@habkost.net \
--cc=marcel.apfelbaum@gmail.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=wangyanan55@huawei.com \
--cc=zhao1.liu@intel.com \
/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).