qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, jsnow@redhat.com,
	Thomas Huth <thuth@redhat.com>
Subject: [Qemu-devel] [PULL 02/13] hw/ide/microdrive: Mark the dscm1xxxx device with user_creatable = false
Date: Mon, 18 Sep 2017 20:11:36 -0400	[thread overview]
Message-ID: <20170919001147.23182-4-jsnow@redhat.com> (raw)
In-Reply-To: <20170919001147.23182-1-jsnow@redhat.com>

From: Thomas Huth <thuth@redhat.com>

QEMU currently aborts with an assertion message when the user is trying
to remove a dscm1xxxx again:

$ aarch64-softmmu/qemu-system-aarch64 -S -M integratorcp -nographic
QEMU 2.9.93 monitor - type 'help' for more information
(qemu) device_add dscm1xxxx,id=xyz
(qemu) device_del xyz
**
ERROR:qemu/qdev-monitor.c:872:qdev_unplug: assertion failed: (hotplug_ctrl)
Aborted (core dumped)

Looks like this device has to be wired up in code and is not meant
to be hot-pluggable, so let's mark it with user_creatable = false.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-id: 1503543783-17192-1-git-send-email-thuth@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
---
 hw/ide/microdrive.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/ide/microdrive.c b/hw/ide/microdrive.c
index e3fd30e..17917c0 100644
--- a/hw/ide/microdrive.c
+++ b/hw/ide/microdrive.c
@@ -575,12 +575,15 @@ PCMCIACardState *dscm1xxxx_init(DriveInfo *dinfo)
 static void dscm1xxxx_class_init(ObjectClass *oc, void *data)
 {
     PCMCIACardClass *pcc = PCMCIA_CARD_CLASS(oc);
+    DeviceClass *dc = DEVICE_CLASS(oc);
 
     pcc->cis = dscm1xxxx_cis;
     pcc->cis_len = sizeof(dscm1xxxx_cis);
 
     pcc->attach = dscm1xxxx_attach;
     pcc->detach = dscm1xxxx_detach;
+    /* Reason: Needs to be wired-up in code, see dscm1xxxx_init() */
+    dc->user_creatable = false;
 }
 
 static const TypeInfo dscm1xxxx_type_info = {
-- 
2.9.5

  parent reply	other threads:[~2017-09-19  0:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-19  0:11 [Qemu-devel] [PULL 13/13] hw/block/fdc: Convert to realize John Snow
2017-09-19  0:11 ` [Qemu-devel] [PULL 00/13] Ide patches John Snow
2017-09-19 10:04   ` Peter Maydell
2017-09-19  0:11 ` [Qemu-devel] [PULL 01/13] ide: ahci: unparent children buses before freeing their memory John Snow
2017-09-19  0:11 ` John Snow [this message]
2017-09-19  0:11 ` [Qemu-devel] [PULL 03/13] IDE: replace DEBUG_IDE with tracing system John Snow
2017-09-19  0:11 ` [Qemu-devel] [PULL 04/13] IDE: Add register hints to tracing John Snow
2017-09-19  0:11 ` [Qemu-devel] [PULL 05/13] IDE: add tracing for data ports John Snow
2017-09-19  0:11 ` [Qemu-devel] [PULL 06/13] ATAPI: Replace DEBUG_IDE_ATAPI with tracing events John Snow
2017-09-19  0:11 ` [Qemu-devel] [PULL 07/13] IDE: replace DEBUG_AIO with trace events John Snow
2017-09-19  0:11 ` [Qemu-devel] [PULL 08/13] AHCI: Replace DPRINTF with trace-events John Snow
2017-09-19  0:11 ` [Qemu-devel] [PULL 09/13] AHCI: Rework IRQ constants John Snow
2017-09-19  0:11 ` [Qemu-devel] [PULL 10/13] AHCI: pretty-print FIS to buffer instead of stderr John Snow
2017-09-19  0:11 ` [Qemu-devel] [PULL 11/13] AHCI: remove DPRINTF macro John Snow
2017-09-19  0:11 ` [Qemu-devel] [PULL 12/13] hw/ide: Convert DeviceClass init to realize John Snow
2017-09-19  0:11 ` [Qemu-devel] [PULL 13/13] hw/block/fdc: Convert " John Snow

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=20170919001147.23182-4-jsnow@redhat.com \
    --to=jsnow@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@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).