Filip Hejsek wrote on Sun, Sep 21, 2025 at 01:45:38AM +0200: > From: Szymon Lukasz <[email protected]> > > Implement the part of the virtio spec that allows to notify the virtio > driver about terminal resizes. The virtio spec contains two methods to > achieve that: > > For legacy drivers, we have only one port and we put the terminal size > in the config space and inject the config changed interrupt. > > For multiport devices, we use the control virtqueue to send a packet > containing the terminal size. Note that old versions of the Linux kernel > used an incorrect order for the fields (rows then cols instead of cols > then rows), until it was fixed by commit > 5326ab737a47278dbd16ed3ee7380b26c7056ddd. > > As a result, when using a Linux kernel older than 6.15, the number of rows > and columns will be swapped.
(subject to this part of the discussion being settled...) > Signed-off-by: Szymon Lukasz <[email protected]> > [Filip: swap rows/cols, console-size affects multiport too, > size config always updated, use use_multiport, move trace call] > Signed-off-by: Filip Hejsek <[email protected]> Reviewed-by: Dominique Martinet <[email protected]> Tested-by: Dominique Martinet <[email protected]> > diff --git a/hw/core/machine.c b/hw/core/machine.c > index > 38c949c4f2ce4a117cbfca62f56919711ce392b4..74a747ec6578c958b35e1f9712e5dbed7bca72e8 > 100644 > --- a/hw/core/machine.c > +++ b/hw/core/machine.c > @@ -37,7 +37,9 @@ > #include "hw/virtio/virtio-iommu.h" > #include "audio/audio.h" > > -GlobalProperty hw_compat_10_1[] = {}; > +GlobalProperty hw_compat_10_1[] = { > + { "virtio-serial-device", "console-size", "off" }, Oh the original patches had this wrong, good catch! -- Dominique Martinet | Asmadeus
