summaryrefslogtreecommitdiffstats
path: root/hw/s390x/sclp.c
diff options
context:
space:
mode:
authorThomas Huth2017-10-04 15:53:19 +0200
committerCornelia Huck2017-10-06 10:53:02 +0200
commite6cb60bf158fe7ea4505d760fdbb7abe4dbf4362 (patch)
treedffdb3c11564df777f7680cc9fc3740079451d7d /hw/s390x/sclp.c
parents390/kvm: make TOD setting failures fatal for migration (diff)
downloadqemu-e6cb60bf158fe7ea4505d760fdbb7abe4dbf4362.tar.gz
qemu-e6cb60bf158fe7ea4505d760fdbb7abe4dbf4362.tar.xz
qemu-e6cb60bf158fe7ea4505d760fdbb7abe4dbf4362.zip
s390x/sclp: Mark the sclp device with user_creatable = false
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 <thuth@redhat.com> Message-Id: <1507125199-22562-1-git-send-email-thuth@redhat.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com> Reviewed-by: Farhan Ali <alifm@linux.vnet.ibm.com> Acked-by: Halil Pasic <pasic@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'hw/s390x/sclp.c')
-rw-r--r--hw/s390x/sclp.c5
1 files changed, 5 insertions, 0 deletions
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;