From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MZ0NI-0007Wd-KE for qemu-devel@nongnu.org; Thu, 06 Aug 2009 06:39:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MZ0ND-0007VQ-Ad for qemu-devel@nongnu.org; Thu, 06 Aug 2009 06:39:07 -0400 Received: from [199.232.76.173] (port=51988 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MZ0ND-0007VN-6l for qemu-devel@nongnu.org; Thu, 06 Aug 2009 06:39:03 -0400 Received: from mx20.gnu.org ([199.232.41.8]:52489) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MZ0NC-0003UP-NR for qemu-devel@nongnu.org; Thu, 06 Aug 2009 06:39:02 -0400 Received: from mx2.redhat.com ([66.187.237.31]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MZ0NB-0006BA-MU for qemu-devel@nongnu.org; Thu, 06 Aug 2009 06:39:01 -0400 Date: Thu, 6 Aug 2009 16:08:43 +0530 From: Amit Shah Subject: Re: [Qemu-devel] Re: virtio-serial: An interface for host-guest communication Message-ID: <20090806103843.GC9222@amit-x200.redhat.com> References: <1248717876-17630-1-git-send-email-amit.shah@redhat.com> <4A6E0C9E.10908@codemonkey.ws> <20090727203214.GG15020@redhat.com> <20090727204627.GA32432@shareable.org> <4A6E3BDC.8050101@codemonkey.ws> <20090728140029.GA16067@amd.home.annexia.org> <4A77410D.4090804@codemonkey.ws> <20090805175713.GB28738@shareable.org> <4A79C8D9.5030606@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A79C8D9.5030606@codemonkey.ws> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, "Richard W.M. Jones" , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org On (Wed) Aug 05 2009 [13:00:57], Anthony Liguori wrote: > Jamie Lokier wrote: >> Anthony Liguori wrote: >> >>> Richard W.M. Jones wrote: >>> Have you considered using a usb serial device? Something attractive >>> about it is that a productid/vendorid can be specified which means >>> that you can use that as a method of enumerating devices. >>> >>> Hot add/remove is supported automagically. >>> >> >> The same applies to PCI: productid/vendorid (and subids); >> PCI hotplug is possible though not as native as USB. >> > > What's nice about USB is that HID specifies quite a few functional > generic devices that can be extended to increase functionality. This > means you can implement a more sophisticated usb device that satisfies > the serial interface, provide a special more featureful driver for > Linux, and just use normal serial for Windows. > > The downside is that USB emulation stinks. And the virtio code is pretty simple and self-contained. I don't see why we'd restrict us more to use something else. >> Here's another idea: Many devices these days have a serial number or >> id string. E.g. USB storage, ATA drives, media cards, etc. Linux >> these days creates alias device nodes which include the id string in >> the device name. E.g. /dev/disks/by-id/ata-FUJITSU_MHV2100BH_NWAQT662615H >> >> So in addition to (or instead of) /dev/vmch0, /dev/vmch1 etc., >> Linux guests could easily generate: >> >> /dev/vmchannel/by-role/clipboard-0 >> /dev/vmchannel/by-role/gueststats-0 >> /dev/vmchannel/by-role/vmmanager-0 >> >> It's not necessary to do this at the beginning. All that is needed is >> to provide enough id information that will appear in /sys/..., so that >> that a udev policy for naming devices can be created at some later date. > > Well my thinking is that the "clipboard" device actually becomes a USB > serial device. It's easy to enumerate and detect via the existing Linux > infrastructure. Plus usb drivers can be implemented in userspace which > is a nice plus (cross platform too via libusb). Sure; but there's been no resistance from anyone from including the virtio-serial device driver so maybe we don't need to discuss that. Amit