From nobody Sat May 4 01:13:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1492018404519853.6087093352075; Wed, 12 Apr 2017 10:33:24 -0700 (PDT) Received: from localhost ([::1]:45545 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cyM8x-0001ej-8V for importer@patchew.org; Wed, 12 Apr 2017 13:33:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39670) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cyM7p-00017M-Fy for qemu-devel@nongnu.org; Wed, 12 Apr 2017 13:32:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cyM7o-0001Ro-FC for qemu-devel@nongnu.org; Wed, 12 Apr 2017 13:32:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37840) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cyM7j-0001Ps-MF; Wed, 12 Apr 2017 13:32:07 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 608DA33C150; Wed, 12 Apr 2017 17:32:06 +0000 (UTC) Received: from thinkpad.redhat.com (ovpn-116-243.ams2.redhat.com [10.36.116.243]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1B36E17103; Wed, 12 Apr 2017 17:32:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 608DA33C150 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=lvivier@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 608DA33C150 From: Laurent Vivier To: Peter Maydell Date: Wed, 12 Apr 2017 19:32:03 +0200 Message-Id: <20170412173203.20072-1-lvivier@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 12 Apr 2017 17:32:06 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] arm: remove remaining cannot_destroy_with_object_finalize_yet X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Markus Armbruster , qemu-devel@nongnu.org, Beniamino Galvani , qemu-arm@nongnu.org, Antony Pavlov , "Edgar E . Iglesias" , Alistair Francis Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" With commit ce5b1bbf624b ("exec: move cpu_exec_init() calls to realize functions"), we can now remove all the remaining cannot_destroy_with_object_finalize_yet as unsafe references have been moved to cpu_exec_realizefn(). (tested with QOM command provided by commit 4c315c27). Suggested-by: Markus Armbruster Signed-off-by: Laurent Vivier --- hw/arm/allwinner-a10.c | 6 ------ hw/arm/bcm2836.c | 6 ------ hw/arm/digic.c | 6 ------ hw/arm/fsl-imx25.c | 5 ----- hw/arm/fsl-imx31.c | 5 ----- hw/arm/fsl-imx6.c | 5 ----- hw/arm/xlnx-zynqmp.c | 6 ------ 7 files changed, 39 deletions(-) diff --git a/hw/arm/allwinner-a10.c b/hw/arm/allwinner-a10.c index ca15d1c..f62a9a3 100644 --- a/hw/arm/allwinner-a10.c +++ b/hw/arm/allwinner-a10.c @@ -118,12 +118,6 @@ static void aw_a10_class_init(ObjectClass *oc, void *d= ata) DeviceClass *dc =3D DEVICE_CLASS(oc); =20 dc->realize =3D aw_a10_realize; - - /* - * Reason: creates an ARM CPU, thus use after free(), see - * arm_cpu_class_init() - */ - dc->cannot_destroy_with_object_finalize_yet =3D true; } =20 static const TypeInfo aw_a10_type_info =3D { diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c index 8451190..8c43291 100644 --- a/hw/arm/bcm2836.c +++ b/hw/arm/bcm2836.c @@ -160,12 +160,6 @@ static void bcm2836_class_init(ObjectClass *oc, void *= data) =20 dc->props =3D bcm2836_props; dc->realize =3D bcm2836_realize; - - /* - * Reason: creates an ARM CPU, thus use after free(), see - * arm_cpu_class_init() - */ - dc->cannot_destroy_with_object_finalize_yet =3D true; } =20 static const TypeInfo bcm2836_type_info =3D { diff --git a/hw/arm/digic.c b/hw/arm/digic.c index d60ea39..94f3263 100644 --- a/hw/arm/digic.c +++ b/hw/arm/digic.c @@ -101,12 +101,6 @@ static void digic_class_init(ObjectClass *oc, void *da= ta) DeviceClass *dc =3D DEVICE_CLASS(oc); =20 dc->realize =3D digic_realize; - - /* - * Reason: creates an ARM CPU, thus use after free(), see - * arm_cpu_class_init() - */ - dc->cannot_destroy_with_object_finalize_yet =3D true; } =20 static const TypeInfo digic_type_info =3D { diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c index 2126f73..9056f27 100644 --- a/hw/arm/fsl-imx25.c +++ b/hw/arm/fsl-imx25.c @@ -290,11 +290,6 @@ static void fsl_imx25_class_init(ObjectClass *oc, void= *data) =20 dc->realize =3D fsl_imx25_realize; =20 - /* - * Reason: creates an ARM CPU, thus use after free(), see - * arm_cpu_class_init() - */ - dc->cannot_destroy_with_object_finalize_yet =3D true; dc->desc =3D "i.MX25 SOC"; } =20 diff --git a/hw/arm/fsl-imx31.c b/hw/arm/fsl-imx31.c index dd1c713..d7e2d83 100644 --- a/hw/arm/fsl-imx31.c +++ b/hw/arm/fsl-imx31.c @@ -262,11 +262,6 @@ static void fsl_imx31_class_init(ObjectClass *oc, void= *data) =20 dc->realize =3D fsl_imx31_realize; =20 - /* - * Reason: creates an ARM CPU, thus use after free(), see - * arm_cpu_class_init() - */ - dc->cannot_destroy_with_object_finalize_yet =3D true; dc->desc =3D "i.MX31 SOC"; } =20 diff --git a/hw/arm/fsl-imx6.c b/hw/arm/fsl-imx6.c index 76dd8a4..6969e73 100644 --- a/hw/arm/fsl-imx6.c +++ b/hw/arm/fsl-imx6.c @@ -442,11 +442,6 @@ static void fsl_imx6_class_init(ObjectClass *oc, void = *data) =20 dc->realize =3D fsl_imx6_realize; =20 - /* - * Reason: creates an ARM CPU, thus use after free(), see - * arm_cpu_class_init() - */ - dc->cannot_destroy_with_object_finalize_yet =3D true; dc->desc =3D "i.MX6 SOC"; } =20 diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c index bc4e66b..4f67158 100644 --- a/hw/arm/xlnx-zynqmp.c +++ b/hw/arm/xlnx-zynqmp.c @@ -439,12 +439,6 @@ static void xlnx_zynqmp_class_init(ObjectClass *oc, vo= id *data) =20 dc->props =3D xlnx_zynqmp_props; dc->realize =3D xlnx_zynqmp_realize; - - /* - * Reason: creates an ARM CPU, thus use after free(), see - * arm_cpu_class_init() - */ - dc->cannot_destroy_with_object_finalize_yet =3D true; } =20 static const TypeInfo xlnx_zynqmp_type_info =3D { --=20 2.9.3