From nobody Wed May 15 09:26:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1606828526; cv=none; d=zohomail.com; s=zohoarc; b=RJ1evGxZLixmqM661FyBCCrG7PGvorhQ5TFZA+4UgDPpesfZS/hQiuogq4F6mT9FBaTHjKMY3PW/y/o89smc6ZsBuCUny0sXRob5UkB34edHjGG6AwDOKC5zvmeZzN8Wgi9NaYb7ZqOpz2XemD1Nunh7EQFF8pxw/7jcKziSO9w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1606828526; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=tHqO4ikQOiJWRghCf17RVm32iQ4CYgS60f0BfIidEro=; b=mkZzuuMjEeKQlR76ubfvlvFgqrdxNGFwEIglDrZUT0J/ACtBW4x6WiENMYv2JB1/TwKJLaHd0cpxpgKj5iel8hjuTFtLRRK9E6PULbEQCEUQjC4fsJJmfROahrEVBzV+HDbAm5gxH3MQVxid/VnBPO/K+NTQ9s7A33lJZb9CYMQ= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1606828526444716.3060528574958; Tue, 1 Dec 2020 05:15:26 -0800 (PST) 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-424-ea_YnoZMMTe4KIpPMI4wGg-1; Tue, 01 Dec 2020 08:11:20 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 204801092BA4; Tue, 1 Dec 2020 13:11:15 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4112760C0F; Tue, 1 Dec 2020 13:11:14 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6898C4A7C6; Tue, 1 Dec 2020 13:11:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0B1DB9p2006106 for ; Tue, 1 Dec 2020 08:11:09 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1D35A19C48; Tue, 1 Dec 2020 13:11:09 +0000 (UTC) Received: from bahia.redhat.com (ovpn-112-87.ams2.redhat.com [10.36.112.87]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1BE6B19C44; Tue, 1 Dec 2020 13:11:03 +0000 (UTC) X-MC-Unique: ea_YnoZMMTe4KIpPMI4wGg-1 From: Greg Kurz To: qemu-devel@nongnu.org Subject: [PATCH] target/ppc: Remove "compat" property of server class POWER CPUs Date: Tue, 1 Dec 2020 14:11:03 +0100 Message-Id: <20201201131103.897430-1-groug@kaod.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: libvir-list@redhat.com, qemu-ppc@nongnu.org, Greg Kurz , David Gibson X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This property has been deprecated since QEMU 5.0 by commit 22062e54bb68. We only kept a legacy hack that internally converts "compat" into the official "max-cpu-compat" property of the pseries machine type. According to our deprecation policy, we could have removed it for QEMU 5.2 already. Do it now ; since ppc_cpu_parse_featurestr() now just calls the generic parent_parse_features handler, drop it as well. Users are supposed to use the "max-cpu-compat" property of the pseries machine type instead. Signed-off-by: Greg Kurz Reviewed-by: J=C3=A1n Tomko --- docs/system/deprecated.rst | 7 ---- target/ppc/translate_init.c.inc | 59 --------------------------------- 2 files changed, 66 deletions(-) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index 565389697e84..09c8f380bc82 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -281,13 +281,6 @@ a future version of QEMU. It's unclear whether anybody= is still using CPU emulation in QEMU, and there are no test images available to make sure that the code is still working. =20 -``compat`` property of server class POWER CPUs (since 5.0) -'''''''''''''''''''''''''''''''''''''''''''''''''''''''''' - -The ``compat`` property used to set backwards compatibility modes for -the processor has been deprecated. The ``max-cpu-compat`` property of -the ``pseries`` machine type should be used instead. - ``lm32`` CPUs (since 5.2.0) ''''''''''''''''''''''''''' =20 diff --git a/target/ppc/translate_init.c.inc b/target/ppc/translate_init.c.= inc index 78cc8f043b92..e4082cfde746 100644 --- a/target/ppc/translate_init.c.inc +++ b/target/ppc/translate_init.c.inc @@ -10470,63 +10470,6 @@ static ObjectClass *ppc_cpu_class_by_name(const ch= ar *name) return oc; } =20 -static void ppc_cpu_parse_featurestr(const char *type, char *features, - Error **errp) -{ - Object *machine =3D qdev_get_machine(); - const PowerPCCPUClass *pcc =3D POWERPC_CPU_CLASS(object_class_by_name(= type)); - - if (!features) { - return; - } - - if (object_property_find(machine, "max-cpu-compat")) { - int i; - char **inpieces; - char *s =3D features; - Error *local_err =3D NULL; - char *compat_str =3D NULL; - - /* - * Backwards compatibility hack: - * - * CPUs had a "compat=3D" property which didn't make sense for - * anything except pseries. It was replaced by "max-cpu-compat" - * machine option. This supports old command lines like - * -cpu POWER8,compat=3Dpower7 - * By stripping the compat option and applying it to the machine - * before passing it on to the cpu level parser. - */ - inpieces =3D g_strsplit(features, ",", 0); - *s =3D '\0'; - for (i =3D 0; inpieces[i]; i++) { - if (g_str_has_prefix(inpieces[i], "compat=3D")) { - warn_report_once("CPU 'compat' property is deprecated; " - "use max-cpu-compat machine property instead"); - compat_str =3D inpieces[i]; - continue; - } - if ((i !=3D 0) && (s !=3D features)) { - s =3D g_stpcpy(s, ","); - } - s =3D g_stpcpy(s, inpieces[i]); - } - - if (compat_str) { - char *v =3D compat_str + strlen("compat=3D"); - object_property_set_str(machine, "max-cpu-compat", v, &local_e= rr); - } - g_strfreev(inpieces); - if (local_err) { - error_propagate(errp, local_err); - return; - } - } - - /* do property processing with generic handler */ - pcc->parent_parse_features(type, features, errp); -} - PowerPCCPUClass *ppc_cpu_get_family_class(PowerPCCPUClass *pcc) { ObjectClass *oc =3D OBJECT_CLASS(pcc); @@ -10905,8 +10848,6 @@ static void ppc_cpu_class_init(ObjectClass *oc, voi= d *data) device_class_set_parent_reset(dc, ppc_cpu_reset, &pcc->parent_reset); =20 cc->class_by_name =3D ppc_cpu_class_by_name; - pcc->parent_parse_features =3D cc->parse_features; - cc->parse_features =3D ppc_cpu_parse_featurestr; cc->has_work =3D ppc_cpu_has_work; cc->do_interrupt =3D ppc_cpu_do_interrupt; cc->cpu_exec_interrupt =3D ppc_cpu_exec_interrupt; --=20 2.26.2