From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MYknV-0003rB-42 for qemu-devel@nongnu.org; Wed, 05 Aug 2009 14:01:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MYknQ-0003oi-3R for qemu-devel@nongnu.org; Wed, 05 Aug 2009 14:01:08 -0400 Received: from [199.232.76.173] (port=52858 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MYknP-0003od-SY for qemu-devel@nongnu.org; Wed, 05 Aug 2009 14:01:04 -0400 Received: from mail-yw0-f190.google.com ([209.85.211.190]:45525) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MYknP-0006it-4L for qemu-devel@nongnu.org; Wed, 05 Aug 2009 14:01:03 -0400 Received: by ywh28 with SMTP id 28so499153ywh.27 for ; Wed, 05 Aug 2009 11:01:00 -0700 (PDT) Message-ID: <4A79C8D9.5030606@codemonkey.ws> Date: Wed, 05 Aug 2009 13:00:57 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: virtio-serial: An interface for host-guest communication 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> In-Reply-To: <20090805175713.GB28738@shareable.org> 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: Jamie Lokier Cc: Amit Shah , virtualization@lists.linux-foundation.org, "Richard W.M. Jones" , kvm@vger.kernel.org, qemu-devel@nongnu.org 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. > 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). Regards, Anthony Liguori > -- Jamie >