From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: "virtio-dev@lists.oasis-open.org" <virtio-dev@lists.oasis-open.org>
Subject: Re: [virtio-dev] virtio-console: initial size retrieval, port parameter reporting
Date: Sun, 27 Oct 2019 07:39:09 -0400 [thread overview]
Message-ID: <20191027073842-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <9c7a1f52-c9bf-7360-557f-3b5a53ea2b9e@siemens.com>
On Sun, Oct 13, 2019 at 07:48:09PM +0200, Jan Kiszka wrote:
> Hi all,
>
> while implementing a basic virtio-console backend, I noticed some grey
> area regarding when and how the initial console size should be read by
> the driver.
>
> Linux currently only does that sizing when the device signals a config
> change, either via a config interrupt (non-multiport) or by sending a
> VIRTIO_CONSOLE_RESIZE control message. But the spec is not clear whether
> a device is supposed to do exactly that.
>
> Let's look at the two cases, first without VIRTIO_CONSOLE_F_MULTIPORT:
> I would have expected that the driver can find the console size in the
> configuration early, even before FEATURES_OK. And I would have expected
> that Linux evaluates that value during probe. Again, the spec does not
> tell us whether the device must send that initial config update to
> declare the size information valid.
>
> Now with VIRTIO_CONSOLE_F_MULTIPORT:
> Here, the device can only signal the dimensions for ports > 0 via a
> control message. This suggests (but the spec does not state it
> explicitly) that the device will likely send VIRTIO_CONSOLE_RESIZE
> message after VIRTIO_CONSOLE_PORT_READY. And that also for port 0,
> although its size is available also via the config. BTW, is a device in
> that case also supposed to signal a config change? Or should a device
> never offer F_MULTIPORT and F_SIZE at the same time?
>
> In general, the spec does not state when a device should (or rather
> must) send any of the _CONSOLE_PORT, _RESIZE and _PORT_NAME messages. I
> assume they are meant to be sent after _PORT_READY from the driver
> because the spec says:
>
> "After creating and initializing each port, a VIRTIO_CONSOLE_PORT_READY
> control message is sent to the device for that port so the device can
> let the driver know of any additional configuration options set for that
> port."
>
> If my assumption is correct, that ordering should be stated more
> explicitly in the spec.
>
> Jan
Makes sense to me.
> --
> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> Corporate Competence Center Embedded Linux
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
next prev parent reply other threads:[~2019-10-27 11:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-13 17:48 [virtio-dev] virtio-console: initial size retrieval, port parameter reporting Jan Kiszka
2019-10-27 11:39 ` Michael S. Tsirkin [this message]
2019-11-11 17:23 ` Jan Kiszka
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=20191027073842-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=virtio-dev@lists.oasis-open.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox