From 26c80458360dfd14a97a7f5823ad578ebcdffd87 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Mon, 9 Oct 2017 12:32:47 +0200 Subject: [PATCH 28/34] s390x/sclp: Mark the sclp device with user_creatable = false RH-Author: Thomas Huth Message-id: <1507552368-9245-12-git-send-email-thuth@redhat.com> Patchwork-id: 77029 O-Subject: [RHEL-7.5 qemu-kvm-ma PATCH 11/12] s390x/sclp: Mark the sclp device with user_creatable = false Bugzilla: 1492033 RH-Acked-by: Cornelia Huck RH-Acked-by: David Gibson RH-Acked-by: Miroslav Rezanina 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 (cherry picked from commit e6cb60bf158fe7ea4505d760fdbb7abe4dbf4362) Signed-off-by: Miroslav Rezanina --- hw/s390x/sclp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c index 9253dbb..b94ce0c 100644 --- a/hw/s390x/sclp.c +++ b/hw/s390x/sclp.c @@ -584,6 +584,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; -- 1.8.3.1