From nobody Sun Feb 8 12:37:35 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1659712851; cv=none; d=zohomail.com; s=zohoarc; b=JMCS6zOz+LOQcCuT0Tm0GC4UQgsszN473LzoTUEHl4tfwgaUBP1tGL7BqtJCeu2DobQuC5pZwNhkBEvBe0mlTQHB7RWsq+rCvAoPo2qeBr/sgtV631otd1VCjYQ9X8jnv2b7USYLXL941o+h664DaqFUmKncUkaog9d3yzWJPOo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659712851; 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=7iraYkiYx8+NSuanjcxylNLIVSYr1X7Uv5zr34EkgLk=; b=VrpkygDNqhTaq9i/2JdJjypknUf3S7Pe8DaH6GZ2kB+abUeGKuuEzmql43TxRafZb+iGKA82evJQxb+I8ZbQPALyIh2MzOjsOFpVoQ4CDbFoIqdVwHY3DeJ3rDm9tzxO8VoetSnHlPxg+iMZzOcKIw412cBR/CRe5P+qTFggs3c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1659712851893267.6209345900894; Fri, 5 Aug 2022 08:20:51 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-482-2VnAaPPQM2KVa8uUvSTzow-1; Fri, 05 Aug 2022 11:20:39 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EF7123804064; Fri, 5 Aug 2022 15:20:37 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id DD9362026D07; Fri, 5 Aug 2022 15:20:37 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 6BE7A1946A6B; Fri, 5 Aug 2022 15:20:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 197571946A5F for ; Fri, 5 Aug 2022 15:20:36 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 09D94202699A; Fri, 5 Aug 2022 15:20:36 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.39.194.117]) by smtp.corp.redhat.com (Postfix) with ESMTP id BD2CF2027EB4; Fri, 5 Aug 2022 15:20:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659712850; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=7iraYkiYx8+NSuanjcxylNLIVSYr1X7Uv5zr34EkgLk=; b=CjDBGKDW+APhIUtpbvdm3SXZ/L/JfXoc8cTxz1skFVg98XBoGclz5SxSJ8FXXywR2xAAs+ JC1fmMrUAAhgZiRjBhfqqxWDBjEbBXLBwaHm0VTXXfmQkNuIeDY1MncJcW/p0xZc/bZsKA YOb9Z+dwNvgiMfKHLRLqYgH+r3DJbbA= X-MC-Unique: 2VnAaPPQM2KVa8uUvSTzow-1 X-Original-To: libvir-list@listman.corp.redhat.com From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 4/6] target/s390x: display deprecation status in '-cpu help' Date: Fri, 5 Aug 2022 16:20:12 +0100 Message-Id: <20220805152014.135768-5-berrange@redhat.com> In-Reply-To: <20220805152014.135768-1-berrange@redhat.com> References: <20220805152014.135768-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Thomas Huth , Beraldo Leal , David Hildenbrand , libvir-list@redhat.com, Cornelia Huck , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Gerd Hoffmann , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1659712853963100001 When the user queries CPU models via QMP there is a 'deprecated' flag present, however, this is not done for the CLI '-cpu help' command. Reviewed-by: Cornelia Huck Signed-off-by: Daniel P. Berrang=C3=A9 --- target/s390x/cpu_models.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index 1a562d2801..c3a4f80633 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -334,18 +334,31 @@ const S390CPUDef *s390_find_cpu_def(uint16_t type, ui= nt8_t gen, uint8_t ec_ga, static void s390_print_cpu_model_list_entry(gpointer data, gpointer user_d= ata) { const S390CPUClass *scc =3D S390_CPU_CLASS((ObjectClass *)data); + CPUClass *cc =3D CPU_CLASS(scc); char *name =3D g_strdup(object_class_get_name((ObjectClass *)data)); - const char *details =3D ""; + g_autoptr(GString) details =3D g_string_new(""); =20 if (scc->is_static) { - details =3D "(static, migration-safe)"; - } else if (scc->is_migration_safe) { - details =3D "(migration-safe)"; + g_string_append(details, "static, "); + } + if (scc->is_migration_safe) { + g_string_append(details, "migration-safe, "); + } + if (cc->deprecation_note) { + g_string_append(details, "deprecated, "); + } + if (details->len) { + /* cull trailing ', ' */ + g_string_truncate(details, details->len - 2); } =20 /* strip off the -s390x-cpu */ g_strrstr(name, "-" TYPE_S390_CPU)[0] =3D 0; - qemu_printf("s390 %-15s %-35s %s\n", name, scc->desc, details); + if (details->len) { + qemu_printf("s390 %-15s %-35s (%s)\n", name, scc->desc, details->s= tr); + } else { + qemu_printf("s390 %-15s %-35s\n", name, scc->desc); + } g_free(name); } =20 --=20 2.37.1