From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Me2KS-0004qF-IH for qemu-devel@nongnu.org; Thu, 20 Aug 2009 03:45:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Me2KM-0004as-V7 for qemu-devel@nongnu.org; Thu, 20 Aug 2009 03:44:59 -0400 Received: from [199.232.76.173] (port=44740 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Me2KM-0004aU-Mr for qemu-devel@nongnu.org; Thu, 20 Aug 2009 03:44:54 -0400 Received: from mx20.gnu.org ([199.232.41.8]:31744) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Me2KL-000206-Jp for qemu-devel@nongnu.org; Thu, 20 Aug 2009 03:44:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Me2KH-0002Gk-Ce for qemu-devel@nongnu.org; Thu, 20 Aug 2009 03:44:49 -0400 Message-ID: <4A8CFEDD.4000009@redhat.com> Date: Thu, 20 Aug 2009 09:44:29 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: virtio-serial: An interface for host-guest communication References: <20090806173740.GA1178@shareable.org> <4A856B5E.2000303@redhat.com> <4A858FFC.7000607@codemonkey.ws> <200908201701.30467.rusty@rustcorp.com.au> In-Reply-To: <200908201701.30467.rusty@rustcorp.com.au> 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: Rusty Russell Cc: Amit Shah , virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, qemu-devel@nongnu.org On 08/20/09 09:31, Rusty Russell wrote: > On Sat, 15 Aug 2009 01:55:32 am Anthony Liguori wrote: >> Gerd Hoffmann wrote: >>> Also I still think passing a 'protocol' string for each port is a good >>> idea, so you can stick that into a sysfs file for guests use. >> Or drops ports altogether and just use protocol strings... > > Both is silly, yes. > > I guess strings + HAL magic can make the /dev names sane. I don't want to > see userspace trolling through sysfs to figure out what device to open. udev can create sane /dev names (or symlinks) by checking sysfs attributes, apps just open the /dev/whatever then. > Which is why I prefer assigned numbers, which get mapped to minors. ports map trivially to minors. When using protocol strings minors can simply be dynamically auto-allocated by the guest and we don't need the port numbers in the host<->guest protocol any more. I think strings are better as numbers for identifying protocols as you can work without a central registry for the numbers then. cheers, Gerd