qemu/include/hw/s390x
Thomas Huth 052888f043 hw/s390x: Allow to configure the consoles with the "-serial" parameter
The consoles ("sclpconsole" and "sclplmconsole") can only be configured
with "-device" and "-chardev" so far. Other machines use the convenience
option "-serial" to configure the default consoles, even for virtual
consoles like spapr-vty on the pseries machine. So let's support this
option on s390x, too. This way we can easily enable the serial console
here again with "-nodefaults", for example:

qemu-system-s390x -no-shutdown -nographic -nodefaults -serial mon:stdio

... which is way shorter than typing:

qemu-system-s390x -no-shutdown -nographic -nodefaults \
  -chardev stdio,id=c1,mux=on -device sclpconsole,chardev=c1 \
  -mon chardev=c1

The -serial parameter can also be used if you only want to see the QEMU
monitor on stdio without using -nodefaults, but not the console output.
That's something that is pretty impossible with the current code today:

qemu-system-s390x -no-shutdown -nographic -serial none

While we're at it, this patch also maps the second -serial option to the
"sclplmconsole", so that there is now an easy way to configure this second
console on s390x, too, for example:

qemu-system-s390x -no-shutdown -nographic -serial null -serial mon:stdio

Additionally, the new code is also smaller than the old one and we have
less s390x-specific code in vl.c :-)

I've also checked that migration still works as expected by migrating
a guest with console output back and forth between a qemu-system-s390x
that has this patch and an instance without this patch.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1524754794-28005-1-git-send-email-thuth@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2018-04-30 10:48:29 +02:00
..
3270-ccw.h
adapter.h
css-bridge.h
css.h s390x/css: unrestrict cssids 2017-12-14 17:56:54 +01:00
ebcdic.h
event-facility.h hw/s390x: Allow to configure the consoles with the "-serial" parameter 2018-04-30 10:48:29 +02:00
ioinst.h
s390_flic.h s390x/flic: cache the common flic class in a central function 2018-02-09 09:37:13 +01:00
s390-ccw.h
s390-virtio-ccw.h s390x/kvm: use cpu model for gscb on compat machines 2017-10-30 09:03:45 +01:00
sclp.h s390x: remove s390_get_memslot_count 2018-02-26 12:55:26 +01:00
storage-attributes.h Use #include "..." for our own headers, <...> for others 2018-02-09 05:05:11 +01:00
storage-keys.h