From: Thomas Huth <thuth@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>,
Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
Luc Michel <luc.michel@greensocs.com>,
Alistair Francis <alistair.francis@wdc.com>,
qemu-trivial@nongnu.org
Subject: [Qemu-devel] [PATCH] hw/cpu/cluster: Mark the cpu-cluster device with user_creatable = false
Date: Tue, 5 Feb 2019 13:58:45 +0100 [thread overview]
Message-ID: <1549371525-29899-1-git-send-email-thuth@redhat.com> (raw)
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>
---
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, 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 = {
--
1.8.3.1
next reply other threads:[~2019-02-05 13:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-05 12:58 Thomas Huth [this message]
2019-02-05 13:09 ` [Qemu-devel] [PATCH] hw/cpu/cluster: Mark the cpu-cluster device with user_creatable = false Peter Maydell
2019-02-05 13:21 ` Thomas Huth
2019-02-05 15:20 ` Philippe Mathieu-Daudé
2019-02-05 15:21 ` Luc Michel
2019-02-05 19:16 ` Alistair Francis
2019-02-06 14:56 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier
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=1549371525-29899-1-git-send-email-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=alistair.francis@wdc.com \
--cc=ehabkost@redhat.com \
--cc=luc.michel@greensocs.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/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).