From nobody Fri Nov 14 03:48:37 2025 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584494495; cv=none; d=zohomail.com; s=zohoarc; b=giI4dozPnY4eq1856dRRFccHD/96gfHA3DnVpY4nvUzvmWHcPcNwwRFr+9P4K7wj2K/AtdIx/acDsNI1hMQkP03WCXrrGMPF4rtP7R+esEdeo/faSuQnMefPdbhs5KSlDFkoP05BMircmpUN8+LuJ5UUPeXhOF4vYiHcwF4chjo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584494495; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=6sdTixl3XvFiBYSntPyXi7dFn3qA9pvkmLi2kk9CoQg=; b=nzYqO4QKBqa/mp1dgifTNu0ldU64ELLUmc73f8aWihvnifvMT/aLLRPTJWmwDvntXAYtZHSL/tKdeU1a7YOTv8k/foa6TT29ZfEHpSK6FScMqXs4HJRIUpC1JbhzR8ExjGLZ0zKqkJFkNPwN7orfPBekds8+7kDbo6ptr+0iSAY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584494495845279.30124502366505; Tue, 17 Mar 2020 18:21:35 -0700 (PDT) Received: from localhost ([::1]:44014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jENOo-00006a-P8 for importer@patchew.org; Tue, 17 Mar 2020 21:21:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34098) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jENLM-0003sx-0K for qemu-devel@nongnu.org; Tue, 17 Mar 2020 21:18:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jENLK-0000da-Rv for qemu-devel@nongnu.org; Tue, 17 Mar 2020 21:17:59 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:56774) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jENLK-0000cG-O0 for qemu-devel@nongnu.org; Tue, 17 Mar 2020 21:17:58 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-318-qkcd4dzvMgqcR21qo2gXCQ-1; Tue, 17 Mar 2020 21:17:56 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3F7C2107ACC7; Wed, 18 Mar 2020 01:17:55 +0000 (UTC) Received: from localhost (ovpn-118-148.rdu2.redhat.com [10.10.118.148]) by smtp.corp.redhat.com (Postfix) with ESMTP id D335B8FBE9; Wed, 18 Mar 2020 01:17:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584494278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6sdTixl3XvFiBYSntPyXi7dFn3qA9pvkmLi2kk9CoQg=; b=cITuwTKQIz44GO7g0LnFgroVnItXo7LBlaTZdOmPvEeHzjfVRfpC2TkOe/ojUAkEZK2ax5 rCF8Wo6nC+BcfTJUHr5IATFKX45fcOVJsh2REUkgckiiyddNdc6e9z5v+YwNBHWTyPlyQi MSGB4iBW/mhg6Em0steD7QdNIorikRc= X-MC-Unique: qkcd4dzvMgqcR21qo2gXCQ-1 From: Eduardo Habkost To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 02/13] target/i386: Add new property note to versioned CPU models Date: Tue, 17 Mar 2020 21:17:37 -0400 Message-Id: <20200318011748.2104336-3-ehabkost@redhat.com> In-Reply-To: <20200318011748.2104336-1-ehabkost@redhat.com> References: <20200318011748.2104336-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 63.128.21.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Tao Xu , Eduardo Habkost , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Tao Xu Add additional information for -cpu help to indicate the changes in this version of CPU model. Suggested-by: Eduardo Habkost Signed-off-by: Tao Xu Message-Id: <20200212081328.7385-4-tao3.xu@intel.com> Signed-off-by: Eduardo Habkost --- target/i386/cpu.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index c3b5cf1369..dc78494167 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -1690,6 +1690,7 @@ typedef struct PropValue { typedef struct X86CPUVersionDefinition { X86CPUVersion version; const char *alias; + const char *note; PropValue *props; } X86CPUVersionDefinition; =20 @@ -1720,6 +1721,7 @@ struct X86CPUModel { X86CPUDefinition *cpudef; /* CPU model version */ X86CPUVersion version; + const char *note; /* * If true, this is an alias CPU model. * This matters only for "-cpu help" and query-cpu-definitions @@ -4861,6 +4863,7 @@ static void x86_cpu_list_entry(gpointer data, gpointe= r user_data) g_autofree char *name =3D x86_cpu_class_get_model_name(cc); g_autofree char *desc =3D g_strdup(cc->model_description); g_autofree char *alias_of =3D x86_cpu_class_get_alias_of(cc); + g_autofree char *model_id =3D x86_cpu_class_get_model_id(cc); =20 if (!desc && alias_of) { if (cc->model && cc->model->version =3D=3D CPU_VERSION_AUTO) { @@ -4869,11 +4872,14 @@ static void x86_cpu_list_entry(gpointer data, gpoin= ter user_data) desc =3D g_strdup_printf("(alias of %s)", alias_of); } } + if (!desc && cc->model && cc->model->note) { + desc =3D g_strdup_printf("%s [%s]", model_id, cc->model->note); + } if (!desc) { - desc =3D x86_cpu_class_get_model_id(cc); + desc =3D g_strdup_printf("%s", model_id); } =20 - qemu_printf("x86 %-20s %-48s\n", name, desc); + qemu_printf("x86 %-20s %-58s\n", name, desc); } =20 /* list available CPU models and flags */ @@ -5350,6 +5356,7 @@ static void x86_register_cpudef_types(X86CPUDefinitio= n *def) x86_cpu_versioned_model_name(def, vdef->version); m->cpudef =3D def; m->version =3D vdef->version; + m->note =3D vdef->note; x86_register_cpu_model_type(name, m); =20 if (vdef->alias) { --=20 2.24.1