From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvNGd-0006mT-62 for qemu-devel@nongnu.org; Wed, 16 Jan 2013 02:18:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvNGc-0006Rn-0O for qemu-devel@nongnu.org; Wed, 16 Jan 2013 02:18:35 -0500 Received: from e28smtp06.in.ibm.com ([122.248.162.6]:35504) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvNGb-0006RC-9w for qemu-devel@nongnu.org; Wed, 16 Jan 2013 02:18:33 -0500 Received: from /spool/local by e28smtp06.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 16 Jan 2013 12:46:47 +0530 Received: from d28relay05.in.ibm.com (d28relay05.in.ibm.com [9.184.220.62]) by d28dlp02.in.ibm.com (Postfix) with ESMTP id D0C20394004D for ; Wed, 16 Jan 2013 12:48:25 +0530 (IST) Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay05.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r0G7IN5237355716 for ; Wed, 16 Jan 2013 12:48:24 +0530 Received: from d28av03.in.ibm.com (loopback [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r0G7IO5w013156 for ; Wed, 16 Jan 2013 18:18:24 +1100 Message-ID: <50F6543F.4060502@linux.vnet.ibm.com> Date: Wed, 16 Jan 2013 15:18:23 +0800 From: Lei Li MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [RFC] Add serial number to usbdevice when passthrough to VM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel Cc: Gerd Hoffmann Hi guys, Currently we can passthrough the host USB device to the virtual machine. This is done like: –usbdevice host:1234:5678, where 1234 is vendor id, 5678 is product id. But there is a problem. If there are two identical USB devices, where the vendor id and the product id is the same. It's not possible to direct one USB device to VM1 and the second USB device to VM2. So i want make it possible to distingish those devices by adding a third parameter, the Serial number of the USB device. More backinfo as here: https://bugs.launchpad.net/qemu/+bug/1090602 https://bugzilla.redhat.com/show_bug.cgi?id=640332 When i try to add hack as above and test it, I found that some USB device don't have iSerial number, which appear as 0 (This value is given in the "lsusb -v" as "iSerial" field in USB Descriptor), and usb_host_scan may not get the right iSerial number based on the current implement. To solve this problem, I wonder should we support this Serial Number although it might be zero, or should we add a serial number which is generated in Qemu and unique within the virtual machine, we can use physical location to generate such number for example. Please let me know your suggestions and thoughts! Thanks. -- Lei