[PATCH 0/6] virtio-console: notify about the terminal size

Szymon Lukasz posted 6 patches 3 years, 11 months ago
Test FreeBSD passed
Test asan passed
Test docker-quick@centos7 passed
Test checkpatch passed
Test docker-mingw@fedora passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200621162132.62797-1-noh4hss@gmail.com
Maintainers: Samuel Thibault <samuel.thibault@ens-lyon.org>, "Michael S. Tsirkin" <mst@redhat.com>, Max Reitz <mreitz@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Gonglei (Arei)" <arei.gonglei@huawei.com>, Thomas Huth <thuth@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Kevin Wolf <kwolf@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>, Jason Wang <jasowang@redhat.com>, Raphael Norwitz <raphael.norwitz@nutanix.com>, Markus Armbruster <armbru@redhat.com>, Corey Minyard <minyard@acm.org>, Amit Shah <amit@kernel.org>, Cornelia Huck <cohuck@redhat.com>, Halil Pasic <pasic@linux.ibm.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Christian Borntraeger <borntraeger@de.ibm.com>
There is a newer version of this series
backends/cryptodev-vhost-user.c   |  1 +
chardev/char-fe.c                 | 11 ++++++
chardev/char-mux.c                |  7 ++++
chardev/char-stdio.c              | 34 ++++++++++++++++
chardev/char.c                    |  1 +
hw/block/vhost-user-blk.c         |  1 +
hw/char/terminal3270.c            |  1 +
hw/char/trace-events              |  1 +
hw/char/virtio-console.c          | 65 +++++++++++++++++++++++++++++--
hw/char/virtio-serial-bus.c       | 41 ++++++++++++++++++-
hw/ipmi/ipmi_bmc_extern.c         |  1 +
hw/usb/ccid-card-passthru.c       |  1 +
hw/usb/dev-serial.c               |  1 +
hw/usb/redirect.c                 |  1 +
include/chardev/char-fe.h         | 11 ++++++
include/chardev/char.h            |  2 +
include/hw/virtio/virtio-serial.h |  5 +++
include/qemu/main-loop.h          |  4 ++
monitor/hmp.c                     |  1 +
monitor/qmp.c                     |  1 +
net/vhost-user.c                  |  1 +
ui/curses.c                       | 11 +++---
util/main-loop.c                  | 21 ++++++++++
23 files changed, 213 insertions(+), 11 deletions(-)
[PATCH 0/6] virtio-console: notify about the terminal size
Posted by Szymon Lukasz 3 years, 11 months ago
The goal of this series is to have a nice terminal into a Linux guest
without having to set up networking and using, e.g. ssh.

The virtio spec allows a virtio-console device to notify the guest about
terminal resizes in the host. Linux Kernel implements the driver part of
the spec. This series implement the device part in QEMU.

In this series resize notifications are only supported for the stdio
backend but I think it should be easy to add support for the vc backend.
Support for tty/serial backends is complicated by the fact that there is
no clean way to detect resizes of the underlying terminal.

Also there is a problem with the virtio spec and Linux Kernel
implementation, the order of fields in virtio_console_resize struct
differs between the kernel and the spec. I do not know if there is any
implementation of the virtio-console driver that handles resize messages
and uses a different order than Linux.



Szymon Lukasz (6):
  main-loop: change the handling of SIGWINCH
  chardev: add support for retrieving the terminal size
  chardev: add support for notifying about terminal resizes
  char-stdio: add support for the terminal size
  virtio-serial-bus: add terminal resize messages
  virtio-console: notify the guest about terminal resizes

 backends/cryptodev-vhost-user.c   |  1 +
 chardev/char-fe.c                 | 11 ++++++
 chardev/char-mux.c                |  7 ++++
 chardev/char-stdio.c              | 34 ++++++++++++++++
 chardev/char.c                    |  1 +
 hw/block/vhost-user-blk.c         |  1 +
 hw/char/terminal3270.c            |  1 +
 hw/char/trace-events              |  1 +
 hw/char/virtio-console.c          | 65 +++++++++++++++++++++++++++++--
 hw/char/virtio-serial-bus.c       | 41 ++++++++++++++++++-
 hw/ipmi/ipmi_bmc_extern.c         |  1 +
 hw/usb/ccid-card-passthru.c       |  1 +
 hw/usb/dev-serial.c               |  1 +
 hw/usb/redirect.c                 |  1 +
 include/chardev/char-fe.h         | 11 ++++++
 include/chardev/char.h            |  2 +
 include/hw/virtio/virtio-serial.h |  5 +++
 include/qemu/main-loop.h          |  4 ++
 monitor/hmp.c                     |  1 +
 monitor/qmp.c                     |  1 +
 net/vhost-user.c                  |  1 +
 ui/curses.c                       | 11 +++---
 util/main-loop.c                  | 21 ++++++++++
 23 files changed, 213 insertions(+), 11 deletions(-)

-- 
2.27.0