From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvSma-0003FH-RC for qemu-devel@nongnu.org; Wed, 07 Oct 2009 05:26:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvSmV-0003DW-TO for qemu-devel@nongnu.org; Wed, 07 Oct 2009 05:26:04 -0400 Received: from [199.232.76.173] (port=35184 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvSmV-0003DL-J3 for qemu-devel@nongnu.org; Wed, 07 Oct 2009 05:25:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55113) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MvSmV-0004oC-01 for qemu-devel@nongnu.org; Wed, 07 Oct 2009 05:25:59 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n979Pvor020959 for ; Wed, 7 Oct 2009 05:25:58 -0400 Date: Wed, 7 Oct 2009 14:55:19 +0530 From: Amit Shah Subject: Re: [Qemu-devel] [PATCH 3/6] virtio-console: Add a virtio-console bus, support for multiple ports Message-ID: <20091007092519.GB29515@amit-x200.redhat.com> References: <4AC24C34.2080609@redhat.com> <20090930044724.GA28188@amit-x200.redhat.com> <4AC31E03.8000904@redhat.com> <20090930155534.GB1011@amit-x200.redhat.com> <4AC3A5E6.6070703@redhat.com> <20091001045439.GA18563@amit-x200.redhat.com> <4AC46A7A.6030809@redhat.com> <20091001085620.GB8385@amit-x200.redhat.com> <20091001104843.GA12334@amit-x200.redhat.com> <4AC49D79.9070800@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4AC49D79.9070800@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org On (Thu) Oct 01 2009 [14:15:53], Gerd Hoffmann wrote: > Hi, > >> So we will have to spawn a console port at id 0 when the bus is >> initialised. >> >> There are a couple of problems though: >> - How to identify which chardev to associate the port#0 with? > > I'd suggest to give the serial-bus a chardev attribute, which is then > simply passed through, i.e. > > -device virtio-serial-bus,chardev= > > automatically creates a virtioconsole with port=0 and chardev= on > the newly created bus. Hm, this looks weird. Because on one hand we're talking about decoupling the char driver from the core (virtio-serial-bus) and here we're actually attaching a char driver to the bus. >> I guess for both these cases, some special command line tweaks will be >> needed? Or keep the old '-virtioconsole' parameter and put that up as >> port0? > > See above. > > Keeping -virtioconsole for backward compatibility is easy, it would > basically create a chardev with a virtio label as it does today, > then create virtio-serial-bus with chardev=virtio. I prefer to remove the -virtioconsole argument because we won't be able to specify the bus that's to be attached to. Also, we can't say if a virtio-serial-bus is also specified. If one is, we'd want the console to attach to that bus. If one isn't, we'd want to spawn a new one in that case. But as per above, a virtio-serial-bus should always spawn a virtio-console port. I fear we'll end up in a mess of tricky if-else conditions. And I can't think of a nice solution to the problem above right now. Amit