From nobody Wed Apr 9 01:52:43 2025 Return-Path: qemu-devel-bounces+famz=redhat.com@nongnu.org Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO zmta02.collab.prod.int.phx2.redhat.com) (10.5.81.9) by zmail26.collab.prod.int.phx2.redhat.com with LMTP; Mon, 4 Sep 2017 08:53:59 -0400 (EDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 75820122B73 for ; Mon, 4 Sep 2017 08:53:59 -0400 (EDT) Received: by smtp.corp.redhat.com (Postfix) id 71D64C14C4; Mon, 4 Sep 2017 12:53:59 +0000 (UTC) Delivered-To: famz@redhat.com Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 698C0BF672 for ; Mon, 4 Sep 2017 12:53:56 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EE9F880E75 for ; Mon, 4 Sep 2017 12:53:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com EE9F880E75 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=qemu-devel-bounces+famz=redhat.com@nongnu.org DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com EE9F880E75 Received: from localhost ([::1]:59674 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1doqt1-0001BM-6A for famz@redhat.com; Mon, 04 Sep 2017 08:53:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1doqSj-0005Eq-ES for qemu-devel@nongnu.org; Mon, 04 Sep 2017 08:26:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1doqSW-00050I-FN for qemu-devel@nongnu.org; Mon, 04 Sep 2017 08:26:45 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:37138) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1doqSW-0004yH-9t for qemu-devel@nongnu.org; Mon, 04 Sep 2017 08:26:32 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1doqSV-0005dq-57 for qemu-devel@nongnu.org; Mon, 04 Sep 2017 13:26:31 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 4 Sep 2017 13:26:05 +0100 Message-Id: <1504527967-29248-35-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1504527967-29248-1-git-send-email-peter.maydell@linaro.org> References: <1504527967-29248-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PULL 34/36] hw/arm/digic: Mark 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: , Errors-To: qemu-devel-bounces+famz=redhat.com@nongnu.org Sender: "Qemu-devel" X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 205 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 04 Sep 2017 12:53:56 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 04 Sep 2017 12:53:56 +0000 (UTC) for IP:'208.118.235.17' DOMAIN:'lists.gnu.org' HELO:'lists.gnu.org' FROM:'redhat.com@nongnu.org' RCPT:'' X-RedHat-Spam-Score: -5.02 (HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS) 208.118.235.17 lists.gnu.org 208.118.235.17 lists.gnu.org X-Scanned-By: MIMEDefang 2.78 on 10.5.110.25 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Content-Length: 1279 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Thomas Huth QEMU currently shows some unexpected behavior when the user trys to do a "device_add digic" on an unrelated ARM machine like integratorcp in "-nographic" mode (the device_add command does not immediately return to the monitor prompt), and trying to "device_del" the device later results in a "qemu/qdev-monitor.c:872:qdev_unplug: assertion failed: (hotplug_ctrl)" error condition. Looking at the realize function of the device, it uses serial_hds directly and this means that the device can not be added a second time, so let's simply mark it with "user_creatable =3D false" now. Signed-off-by: Thomas Huth Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/arm/digic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/arm/digic.c b/hw/arm/digic.c index 94f3263..6184020 100644 --- a/hw/arm/digic.c +++ b/hw/arm/digic.c @@ -101,6 +101,8 @@ static void digic_class_init(ObjectClass *oc, void *dat= a) DeviceClass *dc =3D DEVICE_CLASS(oc); =20 dc->realize =3D digic_realize; + /* Reason: Uses serial_hds in the realize function --> not usable twic= e */ + dc->user_creatable =3D false; } =20 static const TypeInfo digic_type_info =3D { --=20 2.7.4