qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH v2 2/2] virtio-console: Notify resize to the gue


From: Amit Shah
Subject: [Qemu-devel] Re: [PATCH v2 2/2] virtio-console: Notify resize to the guest.
Date: Fri, 30 Apr 2010 16:13:39 +0530
User-agent: Mutt/1.5.19 (2009-01-05)

On (Fri) Apr 30 2010 [17:12:19], Kusanagi Kouichi wrote:
> I tested this patch as follows:
> I put printf()s into involved functions. Then ran qemu on a terminal
> emulator, and resized it.
> The guest kernel gets initial size. However, it doesn't update the size.
> It seems to need to enable multiport for resize.

If the guest kernel supports multiport, you should send the control
event.

If the guest kernel doesn't support multiport, then you should send a
config space update so that the console size is updated for the only
port that exists.

Sorry for not catching this earlier.

Can you test both the possibilities and let me know? This patch will
have to be updated, of course, to support resize over the config space
in the following function:

> +void virtio_serial_resize_console(VirtIOSerialPort *port, int rows, int cols)
> +{
> +    port->vser->config.rows = rows;
> +    port->vser->config.cols = cols;
> +    send_control_event(port, VIRTIO_CONSOLE_RESIZE, 0);
> +}
> +

...

>  struct virtio_console_config {
>      /*
> -     * These two fields are used by VIRTIO_CONSOLE_F_SIZE which
> -     * isn't implemented here yet
> +     * These two fields are used by VIRTIO_CONSOLE_F_SIZE

This comment could be expanded to explain when we use the config space
for size updates (!multiport) and when we use control messages
(multiport).

Thanks!
                Amit




reply via email to

[Prev in Thread] Current Thread [Next in Thread]