From nobody Tue Feb 10 12:58:10 2026 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 1492753330369506.37553204798155; Thu, 20 Apr 2017 22:42:10 -0700 (PDT) Received: from localhost ([::1]:57257 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d1RKa-0006Su-Nn for importer@patchew.org; Fri, 21 Apr 2017 01:42:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48290) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d1RIq-0005F0-QV for qemu-devel@nongnu.org; Fri, 21 Apr 2017 01:40:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d1RIm-0004RY-LK for qemu-devel@nongnu.org; Fri, 21 Apr 2017 01:40:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50690) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d1RIm-0004R5-FD for qemu-devel@nongnu.org; Fri, 21 Apr 2017 01:40:16 -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 mx1.redhat.com (Postfix) with ESMTPS id 4B6DD8DA28 for ; Fri, 21 Apr 2017 05:40:15 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-149.ams2.redhat.com [10.36.116.149]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0854E6031D; Fri, 21 Apr 2017 05:40:15 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 6F76C113864B; Fri, 21 Apr 2017 07:40:13 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4B6DD8DA28 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=armbru@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4B6DD8DA28 From: Markus Armbruster To: qemu-devel@nongnu.org Date: Fri, 21 Apr 2017 07:40:11 +0200 Message-Id: <1492753213-26516-3-git-send-email-armbru@redhat.com> In-Reply-To: <1492753213-26516-1-git-send-email-armbru@redhat.com> References: <1492753213-26516-1-git-send-email-armbru@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 21 Apr 2017 05:40:15 +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] [PULL 2/4] ppc: remove 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 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" From: Laurent Vivier This removes the assert(kvm_enabled()) from kvmppc_host_cpu_initfn() This assert can never be triggered as the function is only registered when KVM is available (see also 4c315c2 "qdev: Protect device-list-properties against broken devices"). So we can remove the cannot_destroy_with_object_finalize_yet from kvmppc_host_cpu_class_init() without fear and beyond reproach. (as it has already be done for i386 with 771a13e "i386: Unset cannot_destroy_with_object_finalize_yet on "host" model" and e435601 "target-i386: Remove assert(kvm_enabled()) from host_x86_cpu_initfn()") Signed-off-by: Laurent Vivier Message-Id: <20170414083717.13641-3-lvivier@redhat.com> Acked-by: Peter Maydell Acked-by: David Gibson Signed-off-by: Markus Armbruster --- target/ppc/kvm.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index 9f1f132..64017ac 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -2245,14 +2245,8 @@ static void alter_insns(uint64_t *word, uint64_t fla= gs, bool on) } } =20 -static void kvmppc_host_cpu_initfn(Object *obj) -{ - assert(kvm_enabled()); -} - static void kvmppc_host_cpu_class_init(ObjectClass *oc, void *data) { - DeviceClass *dc =3D DEVICE_CLASS(oc); PowerPCCPUClass *pcc =3D POWERPC_CPU_CLASS(oc); uint32_t vmx =3D kvmppc_get_vmx(); uint32_t dfp =3D kvmppc_get_dfp(); @@ -2279,9 +2273,6 @@ static void kvmppc_host_cpu_class_init(ObjectClass *o= c, void *data) if (icache_size !=3D -1) { pcc->l1_icache_size =3D icache_size; } - - /* Reason: kvmppc_host_cpu_initfn() dies when !kvm_enabled() */ - dc->cannot_destroy_with_object_finalize_yet =3D true; } =20 bool kvmppc_has_cap_epr(void) @@ -2333,7 +2324,6 @@ static int kvm_ppc_register_host_cpu_type(void) { TypeInfo type_info =3D { .name =3D TYPE_HOST_POWERPC_CPU, - .instance_init =3D kvmppc_host_cpu_initfn, .class_init =3D kvmppc_host_cpu_class_init, }; PowerPCCPUClass *pvr_pcc; --=20 2.7.4