From nobody Sat Nov 15 12:42:15 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1752570454; cv=none; d=zohomail.com; s=zohoarc; b=Vb1nEVgYe6TebcoCxTb2njy4SvGyzcdGk4QrkLYlsHQdI9IWIGYsBI6z0GDz78DxZrHlN70B1oT0RjCz2OQ7LLr4zIaFSbxR+JEfY6jD2FLB5AmsRsLEt7egnLl13UgmEVhT/uznRmZT4XLtfGlQVqRos2q0CYpdUj7NTqo0zFA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1752570454; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=1HeRttEAmKON49LT3x6332F1JOEdPXk8y2PB9EZ85z0=; b=lkrMHAzvAm5nWt8/95Ijh+1FhITXinLHL0Lu3CLtgEEoq79x6VesGJNvVS4rjx+lbxU7eDjZTLe5cipXvK2dIM4NU226DdK8uIjDBl+7QYTAp+Yy5w3xb3N2eVSue7Dy27R2AsHu48GScrRCCSJTYmg8okqt2zvjriFRZIhb/fM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1752570454178309.0515217756631; Tue, 15 Jul 2025 02:07:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ubbcd-0006ix-5T; Tue, 15 Jul 2025 05:06:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ubbcW-0006ey-FJ for qemu-devel@nongnu.org; Tue, 15 Jul 2025 05:06:40 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ubbcU-0005tq-Mp for qemu-devel@nongnu.org; Tue, 15 Jul 2025 05:06:40 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4538bc52a8dso37597495e9.2 for ; Tue, 15 Jul 2025 02:06:38 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-454dd541a59sm154464795e9.32.2025.07.15.02.06.35 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 15 Jul 2025 02:06:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1752570396; x=1753175196; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1HeRttEAmKON49LT3x6332F1JOEdPXk8y2PB9EZ85z0=; b=ZBLetSbr/zl3PQEIBacGfMWE9ze+tA+rD4HfnlKINPOOaGwxGbvU7I6syxjYQM37FH BuClDBs7KTr2wQiRek30pvHw3t/2zE94A1PxMRv6UsEpYmYEqRKVe19W79tz7wL2KHNF Ij41zQOy4xDR6sYw1xHbStQx58l2Df0XhXkWfDI31EygClxVDA5T2pkwoMLyRaeqBTog Yt01X3SdTzZ8K1ef0+ZRm4pc6bpBK0mNKMKDKcia/iIWjwZ3YH+L8n5xZxUG3IBGZ/+t xpkjUXBDEaafxkXjRYJUFfCNck5FcEztoIwJQDurU/pf8UeZXtX522Gi/H3DOYzDGqFG b5iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752570396; x=1753175196; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1HeRttEAmKON49LT3x6332F1JOEdPXk8y2PB9EZ85z0=; b=mUki2oCpzT2dP60WJqwjUL8xbWHWFuePnHJ1TOPhPNRRgCs2AA1M1TudhxXlBc3Twq PiZdhJr51YI9IKCHJZYGF8ia8v+4/ddkSzSSFWBwml+QYixGAKK97QlBp7pseAitoJMP wXj53S05sjN6TOcvtjoDirscvqXmuIh0UhdkCgAhKX3xITQRojz00uRf0vp3QiPvraqn Srtdode5dBFj7f9PlK3uqZhaRS0daHn1i+CrZD6R4SamCR3E7zZb+nA1QQ5O2YU1ncMl 0u92diDeloUPiX+4pm7RxmBKsPq/JtmrYdWw4YoNrMORH1NwdvWMUiCbrgLHIF843ibN H89A== X-Gm-Message-State: AOJu0Yyt1KlLdpbNw2jpqUTl3q/78lFDaGxk5sQP9c0LuJLG8wJm2bgi 7qSVMtC/aUR56wtm9DEakElpSszpA8ZthUQjJdmJTIA4DEkeXQ51OM45k6S7BFcOMmq+gkpFxv6 60UB3 X-Gm-Gg: ASbGncs4yecrx8V/LrM25LXqvOeV15kPEzRYJK9Bb54QvxZLdH0tU183VURKi0jTozP Qj9ajAyLmZdRscK31s6N6DrpNICHwzFI5pBsW1CGWly1bxr+jseY77WyjRrMyQ+wQhd/gO9x1/9 mctOhEyDdjSQUOfyGcsEO0eP0fD3L6u/U4m/WUNV+dfQLdMqZyrAbVEozUUvkwrMs9aZ3hBoyDd G4EQTXa2UJ+UWqe59Jfr4SVHY9Lz71esW3KNlLq7jmuKNKyq4LGroOz7bCyEDuKSWgqX772aiG8 NIki4cZRqH1ZPV0caByiN599frsZM+6MdD2t1jJo+Jb0Qp9nGQGmsf8Fs1eVBCBEsSZy8eQfxeD SRx6ibKxgWNgSMIpw4vM9A7fCuKmRXyyjvb1srTETDXAQhTfJMHFFfMdKSVkJE1kANmjdl+797U HGBQ== X-Google-Smtp-Source: AGHT+IG7hzNOXhVxa8IqULWr44xWkR010ayQ2TrFa+JcSaiGs5C5sA2IUe4Ty8bp9JCrcAJoWBpW9Q== X-Received: by 2002:a05:600c:1382:b0:453:7713:546a with SMTP id 5b1f17b1804b1-454ec16cd4bmr163068795e9.14.1752570396462; Tue, 15 Jul 2025 02:06:36 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Markus Armbruster , Marcel Apfelbaum , Eric Blake , Yanan Wang , Xiaoyao Li , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Zhao Liu , Richard Henderson Subject: [PATCH-for-10.1 v7 2/2] hw/core/machine: Display CPU model name in 'info cpus' command Date: Tue, 15 Jul 2025 11:06:24 +0200 Message-ID: <20250715090624.52377-3-philmd@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250715090624.52377-1-philmd@linaro.org> References: <20250715090624.52377-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1752570456105116600 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=3D42924 CPU #1: thread_id=3D42924 CPU #2: thread_id=3D42924 CPU #3: thread_id=3D42924 (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=3D42916 model=3Dcortex-a72 CPU #1: thread_id=3D42916 model=3Dcortex-a72 CPU #2: thread_id=3D42916 model=3Dcortex-r5f CPU #3: thread_id=3D42916 model=3Dcortex-r5f (qemu) Reviewed-by: Richard Henderson Reviewed-by: Zhao Liu Tested-by: Zhao Liu Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Xiaoyao Li --- 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 =3D qmp_query_cpus_fast(NULL); =20 for (cpu =3D cpu_list; cpu; cpu =3D cpu->next) { + g_autofree char *cpu_model =3D cpu_model_from_type(cpu->value->qom= _type); int active =3D ' '; =20 if (cpu->value->cpu_index =3D=3D monitor_get_cpu_index(mon)) { @@ -40,7 +41,8 @@ void hmp_info_cpus(Monitor *mon, const QDict *qdict) =20 monitor_printf(mon, "%c CPU #%" PRId64 ":", active, cpu->value->cpu_index); - monitor_printf(mon, " thread_id=3D%" PRId64 "\n", cpu->value->thre= ad_id); + monitor_printf(mon, " thread_id=3D%" PRId64 " model=3D%s\n", + cpu->value->thread_id, cpu_model); } =20 qapi_free_CpuInfoFastList(cpu_list); --=20 2.49.0