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

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