qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hw/s390x/sclp: Mark the sclp device with user_creatable = false
@ 2017-10-04 13:53 Thomas Huth
  2017-10-04 14:00 ` Claudio Imbrenda
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Thomas Huth @ 2017-10-04 13:53 UTC (permalink / raw)
  To: qemu-devel, Cornelia Huck, Christian Borntraeger
  Cc: Claudio Imbrenda, Dong Jia Shi, Eric Farman, Farhan Ali, Fei Li,
	Halil Pasic, Janosch Frank, Jason J Herne, Jing Liu, Pierre Morel,
	QingFeng Hao, Xiao Feng Ren, Yang Chen, Yi Min Zhao

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>
---
 hw/s390x/sclp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c
index 30aefbf..9be0cb8 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;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-10-05  8:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-04 13:53 [Qemu-devel] [PATCH] hw/s390x/sclp: Mark the sclp device with user_creatable = false Thomas Huth
2017-10-04 14:00 ` Claudio Imbrenda
2017-10-04 14:22 ` Farhan Ali
2017-10-04 14:56 ` Halil Pasic
2017-10-04 15:18 ` Pierre Morel
2017-10-04 15:42   ` Cornelia Huck
2017-10-04 17:06   ` Thomas Huth
2017-10-05  8:14     ` Cornelia Huck
2017-10-05  8:04 ` Cornelia Huck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).