From patchwork Wed Feb 6 15:28:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1037603 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43vlpm1Yw5z9s7T for ; Thu, 7 Feb 2019 02:33:52 +1100 (AEDT) Received: from localhost ([127.0.0.1]:52689 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grPCw-0003LZ-3h for incoming@patchwork.ozlabs.org; Wed, 06 Feb 2019 10:33:50 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grP84-0000CK-2v for qemu-devel@nongnu.org; Wed, 06 Feb 2019 10:28:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grP81-0004Qj-Rz for qemu-devel@nongnu.org; Wed, 06 Feb 2019 10:28:47 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:39701) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1grP7w-0004Mn-5i; Wed, 06 Feb 2019 10:28:42 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MGQaz-1guuhR0FnZ-00GroH; Wed, 06 Feb 2019 16:28:24 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Wed, 6 Feb 2019 16:28:06 +0100 Message-Id: <20190206152807.31896-7-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190206152807.31896-1-laurent@vivier.eu> References: <20190206152807.31896-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:iH7TvnHM38z1/6cxlo1cF6tH0prcGWKywSJfD6wk1p6glvnKHGo +f41ev8cv64xgJLwtLFO3TLWh4Wf9XJnFZJV2JsUPwnAgO7e/FXcB1U5sH8JuMnQ6OqR6Vx 4BBAxGLBeEQ26ZG5ly50DvbdQP0hu9ukvJx4PJMBiEAOhp23Kz4z2tE7bSuVzETs8s13WZO E9Nu7k3xIawLVYOLvfQyA== X-UI-Out-Filterresults: notjunk:1; V03:K0:wS66bhI8fKI=:hpycvEs1pT+hfG2C6EnRXG YuXez5QyOm8WVGa8+ub9Kv17A0SQJbeMqkzgvqKkq9ICSdN47t5HweOr+YtJl8vzw6R7EJ/P+ qyd91ZBlbcZMqUE/tI1ytk2ib9GWCQUiPNLnDGN41GximCxwANRIlab59aUSWNRzqx9D3powh WNmDqr9G2A2QFfhpilU4D8gd6mNxKvuC24hmJRvKdNsq7QWG4/wtZ2jwigb6e+F8zQWrtz3Li MdeXISdJerTqYxcpSH82wFro3EMMbnE3i5hvLjegz2wQJFS1P8s9q1mQD9NQTcM58W4R3/iIY j0oMcn3fa/LJSizR6QFJxYztbpHjdpm6JGB3hBXwqXeQa6X76AMxTKkIUTkRPZCjUHGbBTZ3V FfAw3nnIs+MA66pqps0OOKN4ppOWMJtA1jUYK7FBxgjQ3EFXxpeM8tOnwEqAgAWYPfphQnA8L oGwTE9gAg0ZqszaLSfZX3tp0PZidBNDEYXIbLdCjIXcZPLiYyKFWQBt8GGUW8qEQF4cjs7j4S EE6xEmqrikwqM3hqHMM/YnIR62TbgIlSBuWxnJfhyHOTV2DH5CFhNfbTririLFL50hxrBxlaA Q0zhrRnERz8h7UA8Dc9P70Sd0bW4hVdMhUYMyAjW+Tvb13i568T1CbEPh1MhPxV1ehbBhovrW ivqMLqi36RxhQpHT5TxTHqe3PCw75k4coo6s0OTURLyhMEUBYTo+ALQ9cZ3KeLKl8mB5DwMI8 Kc6ntktSLKZsF2a06X2z2+cwEaa0VqHn2VTm3tchOCe3b4CNtPvzxx44VwE= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.133 Subject: [Qemu-devel] [PULL 6/7] 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: Peter Maydell , Thomas Huth , Eduardo Habkost , qemu-trivial@nongnu.org, Mark Cave-Ayland , Anthony Green , Michael Tokarev , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , qemu-arm@nongnu.org, Alistair Francis , Luc Michel , Guan Xuetao , Artyom Tarasenko Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Thomas Huth 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 = false. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel Reviewed-by: Alistair Francis Message-Id: <1549371525-29899-1-git-send-email-thuth@redhat.com> Signed-off-by: Laurent Vivier --- hw/cpu/cluster.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/cpu/cluster.c b/hw/cpu/cluster.c index 25f90702b1..6f5f037b3c 100644 --- a/hw/cpu/cluster.c +++ b/hw/cpu/cluster.c @@ -79,6 +79,9 @@ static void cpu_cluster_class_init(ObjectClass *klass, void *data) dc->props = cpu_cluster_properties; dc->realize = cpu_cluster_realize; + + /* This is not directly for users, CPU children must be attached by code */ + dc->user_creatable = false; } static const TypeInfo cpu_cluster_type_info = {