I will respond to all messages from this thread at once here.

Daniel P. Berrangé wrote:
> That we will always pass size info the guest regardless of the backend,
> across all ports, changes my view about whether it is  reasonable to
> enable resize by default given the known Linux guest bug.
>
> The impact of the guest bug is just about tolerable if we were only going
> to enable passing size information when the user had chosen 'stdio' backend
> as that is relatively rarely used and mostly by ad-hoc dev usage where it
> is perhaps easier for users to get a fixed guest kernel.
>
> If we enable this for all ports though, regardless of backend, then I think
> we're going to cause too much pain for users with the inverted rows/cols,
> as its going to apply in every single deployment of QEMU using virtioconsole.

Inverted rows/cols don't matter for 0x0 size, 0x0 is still 0x0 when
swapped. Sizes other than 0x0 will only be sent from supported backends
(but it will be supported by more than just stdio).

> If the chardev backends are defaulting to 0x0 for everything except
> the 'stdio' backend, then this series is surely going to break all
> existing usage of virtio-console for non-stdio backends ?

At least for Linux guests, if no size is sent, the kernel defaults to
0x0, so sending 0x0 is equivalent to not sending anything. Nothing new
will break by sending 0x0.

We still need to be careful not to reset the size to 0x0 after
userspace has changed it though. With the non-multiport interface, the
kernel will reapply the size every time it gets the config interrupt.
If some other use for the config interrupt is added in the future
besides resizing, it could become a problem.

Actually, from looking at Linux source, it appears that linux only
reads the size after getting the config interrupt. This seems to imply
that linux will ignore the initial value if no interrupt is sent. That
might be a bug.

Maximilian Immanuel Brandtner wrote:
> I agree that this is a much more significant issue and I like your idea
> of adding an opt-in parameter to support resizing for the virtio-
> console chardev.

The console-size property can already disable size support, so making
it an opt-in is only a matter of changing the default

> The smoothest solution would have been a spec-change.

Here is the spec change proposal (thanks to MST for submitting it!):
https://lore.kernel.org/virtio-comment/7b939d85ec0b532bae4c16bb927edddcf663bb48.1758212319.git....@redhat.com/

Best regards,
Filip Hejsek

Reply via email to