{"id":814444,"url":"http://patchwork.ozlabs.org/api/patches/814444/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20170916010330.10435-3-jsnow@redhat.com/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170916010330.10435-3-jsnow@redhat.com>","list_archive_url":null,"date":"2017-09-16T01:03:21","name":"[PULL,02/11] hw/ide/microdrive: Mark the dscm1xxxx device with user_creatable = false","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"ee1b2d77781a4ae38aa9e0b7e7a9f4d0cc7ab8c3","submitter":{"id":64343,"url":"http://patchwork.ozlabs.org/api/people/64343/?format=json","name":"John Snow","email":"jsnow@redhat.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20170916010330.10435-3-jsnow@redhat.com/mbox/","series":[{"id":3405,"url":"http://patchwork.ozlabs.org/api/series/3405/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=3405","date":"2017-09-16T01:03:21","name":null,"version":1,"mbox":"http://patchwork.ozlabs.org/series/3405/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/814444/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/814444/checks/","tags":{},"related":[],"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx07.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx07.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=jsnow@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xvDZ314Lhz9t2c\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 16 Sep 2017 11:04:27 +1000 (AEST)","from localhost ([::1]:55530 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dt1Wz-0005Bu-8H\n\tfor incoming@patchwork.ozlabs.org; Fri, 15 Sep 2017 21:04:25 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:47647)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <jsnow@redhat.com>) id 1dt1WE-0005Ae-6l\n\tfor qemu-devel@nongnu.org; Fri, 15 Sep 2017 21:03:39 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <jsnow@redhat.com>) id 1dt1WB-00067b-Gg\n\tfor qemu-devel@nongnu.org; Fri, 15 Sep 2017 21:03:38 -0400","from mx1.redhat.com ([209.132.183.28]:47856)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <jsnow@redhat.com>) id 1dt1WB-00066h-Am\n\tfor qemu-devel@nongnu.org; Fri, 15 Sep 2017 21:03:35 -0400","from smtp.corp.redhat.com\n\t(int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 653EAC047B9E;\n\tSat, 16 Sep 2017 01:03:34 +0000 (UTC)","from probe.bos.redhat.com (dhcp-17-130.bos.redhat.com\n\t[10.18.17.130])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id DA31A68700;\n\tSat, 16 Sep 2017 01:03:33 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 653EAC047B9E","From":"John Snow <jsnow@redhat.com>","To":"qemu-devel@nongnu.org","Date":"Fri, 15 Sep 2017 21:03:21 -0400","Message-Id":"<20170916010330.10435-3-jsnow@redhat.com>","In-Reply-To":"<20170916010330.10435-1-jsnow@redhat.com>","References":"<20170916010330.10435-1-jsnow@redhat.com>","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.14","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.31]);\n\tSat, 16 Sep 2017 01:03:34 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"[Qemu-devel] [PULL 02/11] hw/ide/microdrive: Mark the dscm1xxxx\n\tdevice with user_creatable = false","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"peter.maydell@linaro.org, Thomas Huth <thuth@redhat.com>,\n\tjsnow@redhat.com","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"},"content":"From: Thomas Huth <thuth@redhat.com>\n\nQEMU currently aborts with an assertion message when the user is trying\nto remove a dscm1xxxx again:\n\n$ aarch64-softmmu/qemu-system-aarch64 -S -M integratorcp -nographic\nQEMU 2.9.93 monitor - type 'help' for more information\n(qemu) device_add dscm1xxxx,id=xyz\n(qemu) device_del xyz\n**\nERROR:qemu/qdev-monitor.c:872:qdev_unplug: assertion failed: (hotplug_ctrl)\nAborted (core dumped)\n\nLooks like this device has to be wired up in code and is not meant\nto be hot-pluggable, so let's mark it with user_creatable = false.\n\nSigned-off-by: Thomas Huth <thuth@redhat.com>\nReviewed-by: John Snow <jsnow@redhat.com>\nMessage-id: 1503543783-17192-1-git-send-email-thuth@redhat.com\nSigned-off-by: John Snow <jsnow@redhat.com>\n---\n hw/ide/microdrive.c | 3 +++\n 1 file changed, 3 insertions(+)","diff":"diff --git a/hw/ide/microdrive.c b/hw/ide/microdrive.c\nindex e3fd30e..17917c0 100644\n--- a/hw/ide/microdrive.c\n+++ b/hw/ide/microdrive.c\n@@ -575,12 +575,15 @@ PCMCIACardState *dscm1xxxx_init(DriveInfo *dinfo)\n static void dscm1xxxx_class_init(ObjectClass *oc, void *data)\n {\n     PCMCIACardClass *pcc = PCMCIA_CARD_CLASS(oc);\n+    DeviceClass *dc = DEVICE_CLASS(oc);\n \n     pcc->cis = dscm1xxxx_cis;\n     pcc->cis_len = sizeof(dscm1xxxx_cis);\n \n     pcc->attach = dscm1xxxx_attach;\n     pcc->detach = dscm1xxxx_detach;\n+    /* Reason: Needs to be wired-up in code, see dscm1xxxx_init() */\n+    dc->user_creatable = false;\n }\n \n static const TypeInfo dscm1xxxx_type_info = {\n","prefixes":["PULL","02/11"]}