From: "Michael S. Tsirkin" <mst@redhat.com>
To: Filip Hejsek <filip.hejsek@gmail.com>
Cc: qemu-devel@nongnu.org,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Laurent Vivier" <lvivier@redhat.com>,
"Amit Shah" <amit@kernel.org>,
"Markus Armbruster" <armbru@redhat.com>,
"Eric Blake" <eblake@redhat.com>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
"Yanan Wang" <wangyanan55@huawei.com>,
"Zhao Liu" <zhao1.liu@intel.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Maximilian Immanuel Brandtner" <maxbr@linux.ibm.com>,
"Dominique Martinet" <asmadeus@codewreck.org>,
"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>,
"Szymon Lukasz" <noh4hss@gmail.com>
Subject: Re: [PATCH v10 00/12] virtio-console: notify about the terminal size
Date: Mon, 12 Oct 2026 10:09:07 -0400 [thread overview]
Message-ID: <20261012100858-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20261012-console-resize-v10-0-2c3b10d829b3@gmail.com>
On Mon, Oct 12, 2026 at 04:04:59PM +0200, Filip Hejsek wrote:
> Summary of the Series
> ---------------------
>
> This series adds terminal size support to the virtio-console device.
> The goal is to make it possible to get a resizable terminal into a guest
> without using e.g. ssh.
>
> Support for detecting terminal size is added to stdio and vc backends,
> but not pty and serial, because for the later it's unfortunately
> impossible to get resize notifications.
>
> A QMP command is added for notifying QEMU about the terminal size
> of any chardev. This can be used by clients to support resizing for
> devices where QEMU is not able to detect the size by itself (e.g. virsh
> console).
>
> There was a bug in Linux versions prior to 6.15 which caused the
> dimensions to be interpreted incorrectly by the guest. The fix has
> been backported to currently supported kernels, but to avoid making the
> terminal harder to use on out of date guests, the feature is disabled
> by default and must be enabled with the console-size property.
>
> Limitations
> -----------
>
> There is no documentation for the virtio-serial device. I'm working on
> this and will submit it separately.
>
> Resizing support for the spice version of 'vc' chardev is still missing.
>
> After migration, the guest is not informed about the new console size.
> I propably won't fix this any time soon unless someone helps me with
> migration stream changes.
virtio things:
Acked-by: Michael S. Tsirkin <mst@redhat.com>
> Full Changelog
> --------------
>
> v10:
> - Fix build error on win32
> - Link to v9: https://lore.kernel.org/qemu-devel/20261012-console-resize-v9-0-8db78320ba81@gmail.com
>
> v9:
> - Clean up SIGWINCH notifier when stdio or curses chardev is destroyed
> - Link to v8: https://lore.kernel.org/qemu-devel/20260929-console-resize-v8-0-2ff9183f8750@gmail.com
>
> v8:
> - Rebased
> - Fixed uninitialized buffer in send_console_resize
> - "Since: 11.1" -> "Since: 11.2"
> - Link to v7: https://lore.kernel.org/qemu-devel/20260609-console-resize-v7-0-0c550fdcec15@gmail.com
>
> v7:
> - Rebased
> - Renamed some functions
> - Made virtio size support disabled by default
> - "Since: 11.0" -> "Since: 11.1"
> - Dropped "must exist" from chardev id param description in qmp docs
> - Link to v6: https://lore.kernel.org/qemu-devel/20260119-console-resize-v6-0-33a7b0330a7a@gmail.com
>
> v6:
> - Rebased (renaming CharBackend -> CharFrontend)
> - Virtio resize message code rewritten to fix corner cases
> - Updated version numbers ('Since: 11.0', hw_compat_10_2)
> - Added note to CHR_EVENT_RESIZE definition comment, explaining
> that only the focused frontend gets the event
> - Fixed checkpatch warning (line length)
> - Link to v5: https://lore.kernel.org/qemu-devel/20250921-console-resize-v5-0-89e3c6727060@gmail.com
>
> v5:
> - Rename chardev-resize -> chardev-window-size-changed
> - Improve chardev-window-size-changed documentation
> - Add partial implementation for 'vc' chardev
> - Config space now returns port 0 size if multiport
> - Console-size property completely disables size support
> - Fix misnamed variables in char-win-stdio
> - Link to v4: https://lore.kernel.org/qemu-devel/20250912-console-resize-v4-0-7925e444afc4@gmail.com
>
> v4:
> - Changed order of rows and cols fields
> - Added support for terminal size on Windows
> - Trace event is also emitted for legacy (non-multiport) drivers
> - Minor fixes required because of changes in QEMU (DECLARE_INSTANCE_CHECKER, qmp-example)
> - Updated version numbers ('Since: 10.2', hw_compat_10_1)
> - Link to v3: https://lore.kernel.org/qemu-devel/20200629164041.472528-1-noh4hss@gmail.com
>
> v3:
> - Add resize messages over QMP, as suggested by Daniel
>
> v2:
> - Fix adding a new virtio feature bit to the virtio console device
>
> ---
> Filip Hejsek (4):
> char-win-stdio: add support for terminal size
> ui/console-vc: forward text console size to vc chardev
> ui/gtk: forward gtk console size to vc chardev
> virtio-serial-bus: add terminal resize messages
>
> Szymon Lukasz (8):
> chardev: add cols, rows fields
> chardev: add CHR_EVENT_RESIZE
> chardev: add qemu_chr_resize()
> char-mux: add support for the terminal size
> main-loop: change the handling of SIGWINCH
> char-stdio: add support for the terminal size
> qmp: add chardev-window-size-changed command
> virtio-console: notify the guest about terminal resizes
>
> backends/cryptodev-vhost-user.c | 1 +
> chardev/char-fe.c | 13 +++++++
> chardev/char-mux.c | 19 ++++++++-
> chardev/char-stdio.c | 33 ++++++++++++++++
> chardev/char-win-stdio.c | 19 +++++++++
> chardev/char.c | 26 +++++++++++++
> hw/block/vhost-user-blk.c | 1 +
> hw/char/terminal3270.c | 1 +
> hw/char/trace-events | 1 +
> hw/char/virtio-console.c | 35 +++++++++++++++--
> hw/char/virtio-serial-bus.c | 81 ++++++++++++++++++++++++++++++++++++++-
> hw/display/vhost-user-media.c | 1 +
> hw/ipmi/ipmi_bmc_extern.c | 1 +
> hw/scsi/vhost-user-scsi.c | 1 +
> hw/usb/ccid-card-passthru.c | 1 +
> hw/usb/dev-serial.c | 1 +
> hw/usb/redirect.c | 1 +
> hw/virtio/vhost-user-base.c | 1 +
> hw/virtio/vhost-user-scmi.c | 1 +
> include/chardev/char-fe.h | 10 +++++
> include/chardev/char.h | 9 +++++
> include/hw/virtio/virtio-serial.h | 7 ++++
> include/qemu/main-loop.h | 5 +++
> monitor/hmp.c | 1 +
> monitor/qmp.c | 1 +
> net/passt.c | 1 +
> net/vhost-user.c | 1 +
> qapi/char.json | 31 +++++++++++++++
> ui/console-vc.c | 8 ++++
> ui/curses.c | 21 +++++++---
> ui/gtk.c | 28 ++++++++++++++
> util/main-loop.c | 33 ++++++++++++++++
> 32 files changed, 382 insertions(+), 12 deletions(-)
> ---
> base-commit: 615ece3c406b262996e569f29ea6eed0d81c4d8d
> change-id: 20250912-console-resize-96c42140ba08
>
> Best regards,
> --
> Filip Hejsek <filip.hejsek@gmail.com>
prev parent reply other threads:[~2026-10-12 14:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-12 14:04 [PATCH v10 00/12] virtio-console: notify about the terminal size Filip Hejsek
2026-10-12 14:05 ` [PATCH v10 01/12] chardev: add cols, rows fields Filip Hejsek
2026-10-12 14:05 ` [PATCH v10 02/12] chardev: add CHR_EVENT_RESIZE Filip Hejsek
2026-10-12 14:05 ` [PATCH v10 03/12] chardev: add qemu_chr_resize() Filip Hejsek
2026-10-12 14:05 ` [PATCH v10 04/12] char-mux: add support for the terminal size Filip Hejsek
2026-10-12 14:05 ` [PATCH v10 05/12] main-loop: change the handling of SIGWINCH Filip Hejsek
2026-10-12 14:05 ` [PATCH v10 06/12] char-stdio: add support for the terminal size Filip Hejsek
2026-10-12 14:05 ` [PATCH v10 07/12] char-win-stdio: add support for " Filip Hejsek
2026-10-12 14:05 ` [PATCH v10 08/12] ui/console-vc: forward text console size to vc chardev Filip Hejsek
2026-10-12 14:05 ` [PATCH v10 09/12] ui/gtk: forward gtk " Filip Hejsek
2026-10-12 14:05 ` [PATCH v10 10/12] qmp: add chardev-window-size-changed command Filip Hejsek
2026-10-12 14:05 ` [PATCH v10 11/12] virtio-serial-bus: add terminal resize messages Filip Hejsek
2026-10-12 14:05 ` [PATCH v10 12/12] virtio-console: notify the guest about terminal resizes Filip Hejsek
2026-10-12 14:09 ` Michael S. Tsirkin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261012100858-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=amit@kernel.org \
--cc=armbru@redhat.com \
--cc=asmadeus@codewreck.org \
--cc=berrange@redhat.com \
--cc=eblake@redhat.com \
--cc=eduardo@habkost.net \
--cc=filip.hejsek@gmail.com \
--cc=lvivier@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=maxbr@linux.ibm.com \
--cc=noh4hss@gmail.com \
--cc=pbonzini@redhat.com \
--cc=philmd@oss.qualcomm.com \
--cc=qemu-devel@nongnu.org \
--cc=wangyanan55@huawei.com \
--cc=zhao1.liu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.