From nobody Fri May 3 16:45:39 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; spf=pass (zoho.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 Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549372445723310.40872871592546; Tue, 5 Feb 2019 05:14:05 -0800 (PST) Received: from localhost ([127.0.0.1]:60121 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gr0Xt-0004kz-Tg for importer@patchew.org; Tue, 05 Feb 2019 08:13:49 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gr0Vo-000336-5V for qemu-devel@nongnu.org; Tue, 05 Feb 2019 08:11:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gr0JU-0005SR-09 for qemu-devel@nongnu.org; Tue, 05 Feb 2019 07:58:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48188) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gr0JS-0005RA-UZ; Tue, 05 Feb 2019 07:58:55 -0500 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 0B89BC01DDFB; Tue, 5 Feb 2019 12:58:53 +0000 (UTC) Received: from thuth.com (ovpn-116-166.ams2.redhat.com [10.36.116.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id D2D696EE6B; Tue, 5 Feb 2019 12:58:49 +0000 (UTC) From: Thomas Huth To: Eduardo Habkost , Marcel Apfelbaum , qemu-devel@nongnu.org Date: Tue, 5 Feb 2019 13:58:45 +0100 Message-Id: <1549371525-29899-1-git-send-email-thuth@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.31]); Tue, 05 Feb 2019 12:58:53 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] hw/cpu/cluster: Mark the cpu-cluster device with user_creatable = false 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: qemu-trivial@nongnu.org, Peter Maydell , qemu-arm@nongnu.org, Alistair Francis , Luc Michel Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The device can not be instantiated by the user and QEMU currently aborts when you try to use it: $ x86_64-softmmu/qemu-system-x86_64 -device cpu-cluster qemu-system-x86_64: hw/cpu/cluster.c:73: cpu_cluster_realize: Assertion `cbdata.cpu_count > 0' failed. Aborted (core dumped) Since this is an internal device only, mark it with user_creatable =3D fals= e. Signed-off-by: Thomas Huth Reviewed-by: Alistair Francis Reviewed-by: Luc Michel Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/cpu/cluster.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/cpu/cluster.c b/hw/cpu/cluster.c index 25f9070..6f5f037 100644 --- a/hw/cpu/cluster.c +++ b/hw/cpu/cluster.c @@ -79,6 +79,9 @@ static void cpu_cluster_class_init(ObjectClass *klass, vo= id *data) =20 dc->props =3D cpu_cluster_properties; dc->realize =3D cpu_cluster_realize; + + /* This is not directly for users, CPU children must be attached by co= de */ + dc->user_creatable =3D false; } =20 static const TypeInfo cpu_cluster_type_info =3D { --=20 1.8.3.1