From nobody Sun Apr 28 16:30:10 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 1507125334265948.440289104268; Wed, 4 Oct 2017 06:55:34 -0700 (PDT) Received: from localhost ([::1]:35320 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzk8r-0001Pu-90 for importer@patchew.org; Wed, 04 Oct 2017 09:55:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56970) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzk76-0000N7-0n for qemu-devel@nongnu.org; Wed, 04 Oct 2017 09:53:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dzk72-0006uw-4H for qemu-devel@nongnu.org; Wed, 04 Oct 2017 09:53:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34382) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dzk71-0006ud-U7 for qemu-devel@nongnu.org; Wed, 04 Oct 2017 09:53:24 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A9869882FF; Wed, 4 Oct 2017 13:53:22 +0000 (UTC) Received: from thh440s.str.redhat.com (dhcp-192-189.str.redhat.com [10.33.192.189]) by smtp.corp.redhat.com (Postfix) with ESMTP id E0B0B600C8; Wed, 4 Oct 2017 13:53:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A9869882FF Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=thuth@redhat.com From: Thomas Huth To: qemu-devel@nongnu.org, Cornelia Huck , Christian Borntraeger Date: Wed, 4 Oct 2017 15:53:19 +0200 Message-Id: <1507125199-22562-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 04 Oct 2017 13:53:22 +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/s390x/sclp: Mark the sclp 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: , Cc: Eric Farman , Janosch Frank , Halil Pasic , Yi Min Zhao , Jason J Herne , Pierre Morel , Farhan Ali , Jing Liu , Claudio Imbrenda , QingFeng Hao , Xiao Feng Ren , Fei Li , Dong Jia Shi , Yang Chen 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" The "sclp" device is just an internal device that can not be instantiated by the users. If they try to use it, they only get a simple error message: $ qemu-system-s390x -nographic -device sclp qemu-system-s390x: Option '-device s390-sclp-event-facility' cannot be handled by this machine Since sclp_init() tries to create a TYPE_SCLP_EVENT_FACILITY which is a non-pluggable sysbus device, there is really no way that the "sclp" device can be used by the user, so let's set the user_creatable =3D false accordingly. Signed-off-by: Thomas Huth Acked-by: Halil Pasic Reviewed-by: Claudio Imbrenda Reviewed-by: Farhan Ali --- hw/s390x/sclp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c index 30aefbf..9be0cb8 100644 --- a/hw/s390x/sclp.c +++ b/hw/s390x/sclp.c @@ -606,6 +606,11 @@ static void sclp_class_init(ObjectClass *oc, void *dat= a) dc->realize =3D sclp_realize; dc->hotpluggable =3D false; set_bit(DEVICE_CATEGORY_MISC, dc->categories); + /* + * Reason: Creates TYPE_SCLP_EVENT_FACILITY in sclp_init + * which is a non-pluggable sysbus device + */ + dc->user_creatable =3D false; =20 sc->read_SCP_info =3D read_SCP_info; sc->read_storage_element0_info =3D read_storage_element0_info; --=20 1.8.3.1