From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvTQc-0000Bz-MK for qemu-devel@nongnu.org; Wed, 07 Oct 2009 06:07:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvTQX-0000A9-K8 for qemu-devel@nongnu.org; Wed, 07 Oct 2009 06:07:25 -0400 Received: from [199.232.76.173] (port=57596 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvTQX-0000A6-E7 for qemu-devel@nongnu.org; Wed, 07 Oct 2009 06:07:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23653) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MvTQW-00042L-CM for qemu-devel@nongnu.org; Wed, 07 Oct 2009 06:07:21 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n97A7IWY004506 for ; Wed, 7 Oct 2009 06:07:19 -0400 Date: Wed, 7 Oct 2009 15:36:41 +0530 From: Amit Shah Subject: Re: [Qemu-devel] [PATCH 3/6] virtio-console: Add a virtio-console bus, support for multiple ports Message-ID: <20091007100641.GC29515@amit-x200.redhat.com> References: <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> <20091007092519.GB29515@amit-x200.redhat.com> <4ACC6492.6010808@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ACC6492.6010808@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 (Wed) Oct 07 2009 [11:51:14], Gerd Hoffmann wrote: > On 10/07/09 11:25, Amit Shah wrote: >>> -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. > > We don't actually attach the chardev to the bus though. It is just > passed through to the auto-created console port #0. Yes, but it's unituitive... and weird. > But it looks a bit weird indeed. I'm open to better suggestions to > address the "port #0 must be console for backward compatibility reasons" > issue. Hm, me too. I'll think about this more. >>> 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. > > Oh, I thought it would create a new virtio-serial-bus (plus auto-created > port0 console) unconditionally. Just do enougth to keep existing users > of the switch working. > > If you want new features (i.e. two consoles ports attached to one > virtio-serial-bus device) you must use the new syntax. So it's better overall to drop the old syntax altogether, right? It could get easily confusing otherwise. We can easily end up having: -virtioconsole -device virtio-serial-pci,id=blah -device virtport,bus=blah.0 Amit