qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hw/s390x: Emit a warning if user tried to enable USB
@ 2019-10-17 14:21 Thomas Huth
  2019-10-17 14:34 ` Cornelia Huck
  2019-10-17 14:45 ` Christian Borntraeger
  0 siblings, 2 replies; 11+ messages in thread
From: Thomas Huth @ 2019-10-17 14:21 UTC (permalink / raw)
  To: Cornelia Huck, qemu-s390x; +Cc: Halil Pasic, Christian Borntraeger, qemu-devel

There is no USB on s390x, so running qemu-system-s390x with
"-machine ...,usb=on" is certainly wrong. Emit a warning to make
the users aware of their misconfiguration.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 After a year or two, we could finally turn this into a hard error,
 but I think we should give the users some time to fix their command
 lines first, so I'm initially only emitting a warning here.

 hw/s390x/s390-virtio-ccw.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index d3edeef0ad..af8c4c0daf 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -243,6 +243,10 @@ static void ccw_init(MachineState *machine)
     VirtualCssBus *css_bus;
     DeviceState *dev;
 
+    if (machine->usb) {
+        warn_report("This machine does not support USB");
+    }
+
     s390_sclp_init();
     /* init memory + setup max page size. Required for the CPU model */
     s390_memory_init(machine->ram_size);
-- 
2.18.1



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

end of thread, other threads:[~2019-10-18  8:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-17 14:21 [PATCH] hw/s390x: Emit a warning if user tried to enable USB Thomas Huth
2019-10-17 14:34 ` Cornelia Huck
2019-10-17 14:40   ` Thomas Huth
2019-10-17 15:29     ` Cornelia Huck
2019-10-18  5:20       ` Markus Armbruster
2019-10-17 18:18     ` Philippe Mathieu-Daudé
2019-10-18  6:35       ` Thomas Huth
2019-10-18  7:37         ` Philippe Mathieu-Daudé
2019-10-18  8:41         ` Cornelia Huck
2019-10-17 14:45 ` Christian Borntraeger
2019-10-17 16:14   ` Eric Blake

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).