From: Laurent Vivier <laurent@vivier.eu>
To: qemu-devel@nongnu.org
Cc: "Laurent Vivier" <laurent@vivier.eu>,
"Eduardo Habkost" <ehabkost@redhat.com>,
qemu-trivial@nongnu.org, "Anthony Green" <green@moxielogic.com>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
qemu-arm@nongnu.org, "Andrzej Zaborowski" <balrogg@gmail.com>,
"Guan Xuetao" <gxt@mprc.pku.edu.cn>,
"Michael Tokarev" <mjt@tls.msk.ru>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Artyom Tarasenko" <atar4qemu@gmail.com>,
"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
"Thomas Huth" <thuth@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Luc Michel" <luc.michel@greensocs.com>,
"Alistair Francis" <alistair.francis@wdc.com>
Subject: [Qemu-devel] [PULL 6/7] hw/cpu/cluster: Mark the cpu-cluster device with user_creatable = false
Date: Wed, 6 Feb 2019 16:28:06 +0100 [thread overview]
Message-ID: <20190206152807.31896-7-laurent@vivier.eu> (raw)
In-Reply-To: <20190206152807.31896-1-laurent@vivier.eu>
From: Thomas Huth <thuth@redhat.com>
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 <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Luc Michel <luc.michel@greensocs.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <1549371525-29899-1-git-send-email-thuth@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
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 = {
--
2.20.1
next prev parent reply other threads:[~2019-02-06 15:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-06 15:28 [Qemu-devel] [PULL 0/7] Trivial patches patches Laurent Vivier
2019-02-06 15:28 ` [Qemu-devel] [PULL 1/7] qemu-common.h: Update copyright string for 2019 Laurent Vivier
2019-02-06 15:28 ` [Qemu-devel] [PULL 2/7] target/moxie: Fix LGPL information in the file headers Laurent Vivier
2019-02-06 15:28 ` [Qemu-devel] [PULL 3/7] configure: Avoid non-portable 'test -o/-a' Laurent Vivier
2019-02-06 15:28 ` [Qemu-devel] [PULL 4/7] hw/sparc64/sun4u: Drop useless inclusion of "hw/i386/pc.h" Laurent Vivier
2019-02-06 15:28 ` [Qemu-devel] [PULL 5/7] hw/unicore32/puv3: " Laurent Vivier
2019-02-06 15:28 ` Laurent Vivier [this message]
2019-02-06 15:28 ` [Qemu-devel] [PULL 7/7] hw/input/tsc210x: Fix building with no verbosity Laurent Vivier
2019-02-07 16:49 ` [Qemu-devel] [PULL 0/7] Trivial patches patches Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190206152807.31896-7-laurent@vivier.eu \
--to=laurent@vivier.eu \
--cc=alistair.francis@wdc.com \
--cc=atar4qemu@gmail.com \
--cc=balrogg@gmail.com \
--cc=ehabkost@redhat.com \
--cc=green@moxielogic.com \
--cc=gxt@mprc.pku.edu.cn \
--cc=luc.michel@greensocs.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=mjt@tls.msk.ru \
--cc=peter.maydell@linaro.org \
--cc=philmd@redhat.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).