From nobody Sat Apr 27 10:40:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 150289260275427.344409568657852; Wed, 16 Aug 2017 07:10:02 -0700 (PDT) Received: from localhost ([::1]:48942 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dhz1E-0006Y8-Qk for importer@patchew.org; Wed, 16 Aug 2017 10:10:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60295) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dhz0G-00063d-4P for qemu-devel@nongnu.org; Wed, 16 Aug 2017 10:09:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dhz0A-0004L5-Am for qemu-devel@nongnu.org; Wed, 16 Aug 2017 10:09:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59284) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dhz0A-0004KU-4L for qemu-devel@nongnu.org; Wed, 16 Aug 2017 10:08:54 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 10CAAC01418E; Wed, 16 Aug 2017 14:08:53 +0000 (UTC) Received: from thh440s.redhat.com (ovpn-116-65.ams2.redhat.com [10.36.116.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id E52A068D5E; Wed, 16 Aug 2017 14:08:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 10CAAC01418E Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=thuth@redhat.com From: Thomas Huth To: Cornelia Huck , qemu-devel@nongnu.org Date: Wed, 16 Aug 2017 16:08:48 +0200 Message-Id: <1502892528-22618-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 16 Aug 2017 14:08:53 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] hw/watchdog/wdt_diag288: Mark diag288 watchdog as non-hotpluggable 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: , Cc: Christian Borntraeger Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" QEMU currently aborts when the user tries to hot-unplug a diag288 device: $ qemu-system-s390x -nographic -nodefaults -S -monitor stdio QEMU 2.9.92 monitor - type 'help' for more information (qemu) device_add diag288,id=3Dx (qemu) device_del x ** ERROR:qemu/qdev-monitor.c:872:qdev_unplug: assertion failed: (hotplug_ctrl) Aborted (core dumped) The device is not designed as hot-pluggable (it should only be used via the "-watchdog" parameter), so let's simply remove the possibility to hotplug it to prevent that users can run into this ugly situation. Signed-off-by: Thomas Huth --- hw/watchdog/wdt_diag288.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/watchdog/wdt_diag288.c b/hw/watchdog/wdt_diag288.c index a7b64e2..47f2892 100644 --- a/hw/watchdog/wdt_diag288.c +++ b/hw/watchdog/wdt_diag288.c @@ -121,6 +121,7 @@ static void wdt_diag288_class_init(ObjectClass *klass, = void *data) dc->realize =3D wdt_diag288_realize; dc->unrealize =3D wdt_diag288_unrealize; dc->reset =3D wdt_diag288_reset; + dc->hotpluggable =3D false; set_bit(DEVICE_CATEGORY_MISC, dc->categories); dc->vmsd =3D &vmstate_diag288; diag288->handle_timer =3D wdt_diag288_handle_timer; --=20 1.8.3.1