From patchwork Fri Oct 6 09:59:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cornelia Huck X-Patchwork-Id: 822343 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3y7m0K6DDGz9t48 for ; Fri, 6 Oct 2017 21:22:09 +1100 (AEDT) Received: from localhost ([::1]:43965 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0Plg-0007Va-0A for incoming@patchwork.ozlabs.org; Fri, 06 Oct 2017 06:22:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59354) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0PS7-0006wK-U5 for qemu-devel@nongnu.org; Fri, 06 Oct 2017 06:02:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0PS2-0000MK-C9 for qemu-devel@nongnu.org; Fri, 06 Oct 2017 06:01:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42846) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e0PS2-0000KY-6y for qemu-devel@nongnu.org; Fri, 06 Oct 2017 06:01:50 -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 38D323DBE0; Fri, 6 Oct 2017 10:01:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 38D323DBE0 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=cohuck@redhat.com Received: from localhost (dhcp-192-215.str.redhat.com [10.33.192.215]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 385996376D; Fri, 6 Oct 2017 10:01:46 +0000 (UTC) From: Cornelia Huck To: peter.maydell@linaro.org Date: Fri, 6 Oct 2017 11:59:53 +0200 Message-Id: <20171006095956.27534-31-cohuck@redhat.com> In-Reply-To: <20171006095956.27534-1-cohuck@redhat.com> References: <20171006095956.27534-1-cohuck@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.30]); Fri, 06 Oct 2017 10:01:49 +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] [PULL 30/33] 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: thuth@redhat.com, david@redhat.com, Cornelia Huck , agraf@suse.de, qemu-devel@nongnu.org, borntraeger@de.ibm.com, rth@twiddle.net Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Thomas Huth 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 = false accordingly. Signed-off-by: Thomas Huth Message-Id: <1507125199-22562-1-git-send-email-thuth@redhat.com> Reviewed-by: Claudio Imbrenda Reviewed-by: Farhan Ali Acked-by: Halil Pasic Signed-off-by: Cornelia Huck --- hw/s390x/sclp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c index 30aefbfd15..9be0cb80ad 100644 --- a/hw/s390x/sclp.c +++ b/hw/s390x/sclp.c @@ -606,6 +606,11 @@ static void sclp_class_init(ObjectClass *oc, void *data) dc->realize = sclp_realize; dc->hotpluggable = 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 = false; sc->read_SCP_info = read_SCP_info; sc->read_storage_element0_info = read_storage_element0_info;