From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O7nj1-0004my-JI for qemu-devel@nongnu.org; Fri, 30 Apr 2010 06:45:39 -0400 Received: from [140.186.70.92] (port=57130 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O7niz-0004mq-8V for qemu-devel@nongnu.org; Fri, 30 Apr 2010 06:45:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O7niu-0002uV-Cu for qemu-devel@nongnu.org; Fri, 30 Apr 2010 06:45:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:31185) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O7niu-0002ta-59 for qemu-devel@nongnu.org; Fri, 30 Apr 2010 06:45:32 -0400 Date: Fri, 30 Apr 2010 16:13:39 +0530 From: Amit Shah Message-ID: <20100430104338.GA27314@amit-x200.redhat.com> References: <20100416114248.A001562C03A@msa106.auone-net.jp> <20100416130219.GE21268@amit-x200.redhat.com> <20100429071239.6854F6FC039@msa105.auone-net.jp> <20100429104718.GB21309@amit-x200.redhat.com> <20100429123631.130366AC03A@msa102.auone-net.jp> <20100429124917.GC21309@amit-x200.redhat.com> <20100430081220.2178A6AC03A@msa102.auone-net.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100430081220.2178A6AC03A@msa102.auone-net.jp> Subject: [Qemu-devel] Re: [PATCH v2 2/2] virtio-console: Notify resize to the guest. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kusanagi Kouichi Cc: qemu-devel@nongnu.org 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