Initial support for channel-attached 3270 devices (yes, these are the classic 'green-screen' consoles). Acks/reviews for the telnet integration (tn3270) are especially solicited.
To actually make use of this, you need a 3270 emulator (for example, x3270). You can use the 3270 in a Linux guest either as a console (probably not very useful) or as an additional tty (described below). Limitations: The 3270 feature is experimental and it only supports one 3270 device, Linux as guest, x3270 as client. It doesn't support live migration, SSL/TLS encryption, or x3270 client resizing when re-connecting. Multiple commands in one inbound packet, which are usually caused by pressing the "Reset" key during poor network traffic, are not supported right now. Currently, we terminate the connection in that case. Usage: Configure a device, for example with the following command line: -chardev socket,id=char_0,host=0.0.0.0,port=23,nowait,server,tn3270 \ -device x-terminal3270,chardev=char_0,devno=fe.0.000a,id=terminal_0 The guest needs to be configured in the following way: - Make sure that the 3270 channel device is activated (e.g. via chccwdev -e 0.0.000a for the example above). - Start a getty on the respective device node under /dev/3270/ once it shows up. After starting the guest via qemu, connect x3270 to <host ip>:<port>. Jing Liu (6): chardev: Basic support for TN3270 s390x/css: Add an algorithm to find a free chpid s390x/3270: 3270 data stream handling s390x/3270: Add the TCP socket events handler for 3270 s390x/3270: Detect for continued presence of a 3270 client s390x/3270: Mark non-migratable and enable the device Yang Chen (2): s390x/3270: Add abstract emulated ccw-attached 3270 device s390x/3270: Add emulated terminal3270 device chardev/char-socket.c | 76 +++++++--- chardev/char.c | 11 +- default-configs/s390x-softmmu.mak | 1 + hw/char/Makefile.objs | 1 + hw/char/terminal3270.c | 293 ++++++++++++++++++++++++++++++++++++++ hw/s390x/3270-ccw.c | 169 ++++++++++++++++++++++ hw/s390x/Makefile.objs | 1 + hw/s390x/css.c | 24 ++++ include/hw/s390x/3270-ccw.h | 53 +++++++ include/hw/s390x/css.h | 2 + include/sysemu/char.h | 8 ++ qapi-schema.json | 3 + 12 files changed, 620 insertions(+), 22 deletions(-) create mode 100644 hw/char/terminal3270.c create mode 100644 hw/s390x/3270-ccw.c create mode 100644 include/hw/s390x/3270-ccw.h -- 2.11.0