From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH V4 3/7] libxl: add pvusb API Date: Tue, 16 Jun 2015 12:45:37 +0100 Message-ID: References: <1433906441-3280-1-git-send-email-cyliu@suse.com> <1433906441-3280-4-git-send-email-cyliu@suse.com> <21887.64856.265751.921367@mariner.uk.xensource.com> <558000E5.9000803@suse.com> <21888.1058.681450.470806@mariner.uk.xensource.com> <5580079D.6070007@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5580079D.6070007@suse.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Juergen Gross Cc: Wei Liu , Ian Campbell , Ian Jackson , Chunyan Liu , "xen-devel@lists.xen.org" , Jim Fehlig , Simon Cao List-Id: xen-devel@lists.xenproject.org On Tue, Jun 16, 2015 at 12:25 PM, Juergen Gross wrote: >>> qemu does support specifying a USB device via :, >>> which is stable even across reboots, but unfortunately it isn't >>> guaranteed to be unique (you can have plugged in two devices of the >>> same type). >> >> >> Indeed. That would also be a thing we should allow people to do. >> >> AIUI some devices have serial numbers, which means you can distinguish >> them ? > > > Yes, they have. The question is whether those are different on multiple > instances? With "lsusb" I've found a device with serial number > 0123456789ABCD. Do you really believe I'm just lucky owning the one with > such a nice serial number? ;-) So it sounds like we're converging on "Allow multiple ways to specify the interface", with at least the following fields: - bus (int - 1,2,3, &c) - port (string - 2.1.3, &c) - address/devnum (int) - vendorid (uint16_t) - deviceid (uint16_t) That solves the basic problem, because then the missing information needed by the various paths can be looked up and added to the device struct as needed. -George