From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvUvm-0008AS-18 for qemu-devel@nongnu.org; Wed, 07 Oct 2009 07:43:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvUvh-00084n-7E for qemu-devel@nongnu.org; Wed, 07 Oct 2009 07:43:41 -0400 Received: from [199.232.76.173] (port=34730 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvUvg-00084V-MF for qemu-devel@nongnu.org; Wed, 07 Oct 2009 07:43:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6193) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MvUvg-0003So-2O for qemu-devel@nongnu.org; Wed, 07 Oct 2009 07:43:36 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n97BhZQ5006612 for ; Wed, 7 Oct 2009 07:43:35 -0400 Date: Wed, 7 Oct 2009 17:12:57 +0530 From: Amit Shah Subject: Re: [Qemu-devel] [PATCH 3/6] virtio-console: Add a virtio-console bus, support for multiple ports Message-ID: <20091007114257.GA22238@amit-x200.redhat.com> References: <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> <20091007100641.GC29515@amit-x200.redhat.com> <4ACC7CA5.4030704@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ACC7CA5.4030704@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 [13:33:57], Gerd Hoffmann wrote: > On 10/07/09 12:06, Amit Shah wrote: >>> 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 >> >> > virtioconsole> > > It isn't that bad. > > First, the busses get names based on the bus type by default, i.e. when > creating a scsi adapter without specifying id=seomthing the bus is > simply named "scsi.0". Likewise the -virtioconsole created bus would be > "port.0" or simliar (depends on the name in BusInfo). > > Second, the bus= argument is optional. If not specified, qdev will pick > the first bus of a matching type it finds. So as long you have a single > port/scsi/usb/... bus only you don't need bus= at all. You can do: The problem with this is that the management solution needs to know then what is the default bus name (which could change if the code gets updated). And also there's the other problem of a console port spawning a bus (which could end up spawning another console port at #0...) So IMO it's better to leave that command line param out. Amit