From: Szymon Lukasz <noh4hss@gmail.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: lvivier@redhat.com, mst@redhat.com, amit@kernel.org,
qemu-devel@nongnu.org, pbonzini@redhat.com,
marcandre.lureau@redhat.com
Subject: Re: [PATCH v2 0/6] virtio-console: notify about the terminal size
Date: Thu, 25 Jun 2020 11:52:08 +0200 [thread overview]
Message-ID: <20200625095208.GA118320@aorus> (raw)
In-Reply-To: <20200624114915.GH774096@redhat.com>
On Wed, Jun 24, 2020 at 12:49:15PM +0100, Daniel P. Berrangé wrote:
> On Wed, Jun 24, 2020 at 01:26:34PM +0200, Szymon Lukasz wrote:
> > 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.
>
> Well this is a bit of a mess :-(
>
> The main virtio_console_config struct has cols, then rows.
>
> The Linux impl of resizing appears to have arrived in 2010, and created
> a new struct with rows, then cols.
>
> commit 8345adbf96fc1bde7d9846aadbe5af9b2ae90882
> Author: Amit Shah <amit.shah@redhat.com>
> Date: Thu May 6 02:05:09 2010 +0530
>
> virtio: console: Accept console size along with resize control message
>
> The VIRTIO_CONSOLE_RESIZE control message sent to us by the host now
> contains the new {rows, cols} values for the console. This ensures each
> console port gets its own size, and we don't depend on the config-space
> rows and cols values at all now.
>
> Signed-off-by: Amit Shah <amit.shah@redhat.com>
> CC: Christian Borntraeger <borntraeger@de.ibm.com>
> CC: linuxppc-dev@ozlabs.org
> CC: Kusanagi Kouichi <slash@ac.auone-net.jp>
> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
>
>
> The virtio spec documenting this came 4 years later in 2014 and documented
> the resize struct with cols, then rows, which differs from Linux impl,
> but matches ordering of the main virtio_console_config:
>
> commit 908cfaa782e950d6656d947599d7a6c9fb16cad1
> Author: rusty <rusty@0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652>
> Date: Wed Feb 12 03:15:57 2014 +0000
>
> Feedback #6: Applied
>
> As per minutes:
> https://lists.oasis-open.org/archives/virtio/201402/msg00121.html
>
> Signed-off-by: Rusty Russell <rusty@au1.ibm.com>
>
> git-svn-id: https://tools.oasis-open.org/version-control/svn/virtio@237 0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652
>
> I can understand why it is desirable for the resize struct to match
> the order of the initial config struct. I'm guessing it just wasn't
> realized that the Linux impl was inverted for resize
>
> The FreeBSD impl of virtio-console doesn't do resize:
>
> https://github.com/freebsd/freebsd/blob/master/sys/dev/virtio/console/virtio_console.c#L874
>
> Not sure what other impls are going to be around, but I feel like
> Linux is going to be the most commonly deployed by orders of magnitude.
>
> So I'd say QEMU should match Linux, and the spec should be fixed.
I had the same thoughts. I will ask for a change in the spec.
>
>
> Have you reported this bug to the virtio spec people directly yet ?
>
> I don't see an issue open at
>
> https://github.com/oasis-tcs/virtio-spec/issues/
>
> so I think one should be filed there
>
> Regards,
> Daniel
> --
> |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org -o- https://fstop138.berrange.com :|
> |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
>
next prev parent reply other threads:[~2020-06-25 9:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-24 11:26 [PATCH v2 0/6] virtio-console: notify about the terminal size Szymon Lukasz
2020-06-24 11:26 ` [PATCH v2 1/6] main-loop: change the handling of SIGWINCH Szymon Lukasz
2020-06-24 11:26 ` [PATCH v2 2/6] chardev: add support for retrieving the terminal size Szymon Lukasz
2020-06-24 11:26 ` [PATCH v2 3/6] chardev: add support for notifying about terminal resizes Szymon Lukasz
2020-06-24 11:26 ` [PATCH v2 4/6] char-stdio: add support for the terminal size Szymon Lukasz
2020-06-24 11:26 ` [PATCH v2 5/6] virtio-serial-bus: add terminal resize messages Szymon Lukasz
2020-06-24 13:37 ` Michael S. Tsirkin
2020-06-24 11:26 ` [PATCH v2 6/6] virtio-console: notify the guest about terminal resizes Szymon Lukasz
2020-06-24 11:49 ` [PATCH v2 0/6] virtio-console: notify about the terminal size Daniel P. Berrangé
2020-06-25 9:52 ` Szymon Lukasz [this message]
2020-06-25 13:18 ` Michael S. Tsirkin
2020-06-25 13:23 ` Daniel P. Berrangé
2020-06-25 13:45 ` Michael S. Tsirkin
2020-06-24 11:56 ` Daniel P. Berrangé
2020-06-25 9:54 ` Szymon Lukasz
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=20200625095208.GA118320@aorus \
--to=noh4hss@gmail.com \
--cc=amit@kernel.org \
--cc=berrange@redhat.com \
--cc=lvivier@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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.