From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvUmW-0001YO-Mh for qemu-devel@nongnu.org; Wed, 07 Oct 2009 07:34:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvUmS-0001X3-74 for qemu-devel@nongnu.org; Wed, 07 Oct 2009 07:34:08 -0400 Received: from [199.232.76.173] (port=55522 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvUmS-0001X0-18 for qemu-devel@nongnu.org; Wed, 07 Oct 2009 07:34:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51810) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MvUmR-0002Ae-HC for qemu-devel@nongnu.org; Wed, 07 Oct 2009 07:34:03 -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 n97BY2Pn009741 for ; Wed, 7 Oct 2009 07:34:02 -0400 Message-ID: <4ACC7CA5.4030704@redhat.com> Date: Wed, 07 Oct 2009 13:33:57 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 3/6] virtio-console: Add a virtio-console bus, support for multiple ports 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> <20091007100641.GC29515@amit-x200.redhat.com> In-Reply-To: <20091007100641.GC29515@amit-x200.redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: qemu-devel@nongnu.org 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: -virtioconsole -device virtport, and it will work just fine (creating a bus with the autocreated console and additionally a virtport device attached to the same bus). cheers, Gerd