Blame SOURCES/kvm-s390x-sclp-Mark-the-sclp-device-with-user_creatable-.patch

4a2fec
From 26c80458360dfd14a97a7f5823ad578ebcdffd87 Mon Sep 17 00:00:00 2001
4a2fec
From: Thomas Huth <thuth@redhat.com>
4a2fec
Date: Mon, 9 Oct 2017 12:32:47 +0200
4a2fec
Subject: [PATCH 28/34] s390x/sclp: Mark the sclp device with user_creatable =
4a2fec
 false
4a2fec
4a2fec
RH-Author: Thomas Huth <thuth@redhat.com>
4a2fec
Message-id: <1507552368-9245-12-git-send-email-thuth@redhat.com>
4a2fec
Patchwork-id: 77029
4a2fec
O-Subject: [RHEL-7.5 qemu-kvm-ma PATCH 11/12] s390x/sclp: Mark the sclp device with user_creatable = false
4a2fec
Bugzilla: 1492033
4a2fec
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
4a2fec
RH-Acked-by: David Gibson <dgibson@redhat.com>
4a2fec
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
4a2fec
4a2fec
The "sclp" device is just an internal device that can not be instantiated
4a2fec
by the users. If they try to use it, they only get a simple error message:
4a2fec
4a2fec
$ qemu-system-s390x -nographic -device sclp
4a2fec
qemu-system-s390x: Option '-device s390-sclp-event-facility' cannot be
4a2fec
handled by this machine
4a2fec
4a2fec
Since sclp_init() tries to create a TYPE_SCLP_EVENT_FACILITY which is
4a2fec
a non-pluggable sysbus device, there is really no way that the "sclp"
4a2fec
device can be used by the user, so let's set the user_creatable = false
4a2fec
accordingly.
4a2fec
4a2fec
Signed-off-by: Thomas Huth <thuth@redhat.com>
4a2fec
Message-Id: <1507125199-22562-1-git-send-email-thuth@redhat.com>
4a2fec
Reviewed-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
4a2fec
Reviewed-by: Farhan Ali <alifm@linux.vnet.ibm.com>
4a2fec
Acked-by: Halil Pasic <pasic@linux.vnet.ibm.com>
4a2fec
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
4a2fec
(cherry picked from commit e6cb60bf158fe7ea4505d760fdbb7abe4dbf4362)
4a2fec
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
4a2fec
---
4a2fec
 hw/s390x/sclp.c | 5 +++++
4a2fec
 1 file changed, 5 insertions(+)
4a2fec
4a2fec
diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c
4a2fec
index 9253dbb..b94ce0c 100644
4a2fec
--- a/hw/s390x/sclp.c
4a2fec
+++ b/hw/s390x/sclp.c
4a2fec
@@ -584,6 +584,11 @@ static void sclp_class_init(ObjectClass *oc, void *data)
4a2fec
     dc->realize = sclp_realize;
4a2fec
     dc->hotpluggable = false;
4a2fec
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
4a2fec
+    /*
4a2fec
+     * Reason: Creates TYPE_SCLP_EVENT_FACILITY in sclp_init
4a2fec
+     * which is a non-pluggable sysbus device
4a2fec
+     */
4a2fec
+    dc->user_creatable = false;
4a2fec
 
4a2fec
     sc->read_SCP_info = read_SCP_info;
4a2fec
     sc->read_storage_element0_info = read_storage_element0_info;
4a2fec
-- 
4a2fec
1.8.3.1
4a2fec