From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?windows-1252?Q?J=FCrgen_Gro=DF?= Subject: Re: [PATCH V4 3/7] libxl: add pvusb API Date: Tue, 16 Jun 2015 12:56:37 +0200 Message-ID: <558000E5.9000803@suse.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <21887.64856.265751.921367@mariner.uk.xensource.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: Ian Jackson , George Dunlap Cc: Wei Liu , Ian Campbell , Chunyan Liu , "xen-devel@lists.xen.org" , Jim Fehlig , Simon Cao List-Id: xen-devel@lists.xenproject.org On 06/16/2015 12:41 PM, Ian Jackson wrote: > George Dunlap writes ("Re: [Xen-devel] [PATCH V4 3/7] libxl: add pvusb API"): >> Ian / Ian / Wei / Jim: > > Hi. > >> 3. Have the libxl layer accept both busid and bus:addr. Translate as >> necessary and store in the libxl_device_usb struct. > ... >> The advantage of #3 internally is that the functions can do the >> translation once (if necessary), and can then pass around the public >> libxl_device_usb struct as-is without needing any extra parameters or >> a separate libxl_device_usb_internal. The disadvantage, I think, is >> that from an interface perspective, it's fairly pointless to have >> both. busid doesn't really give you any better or more control than >> the other, and it's not any more convenient for the user (in fact it's >> less convenient because it's more difficult to find). > > Is the busid more stable in the face of plug/unplug ? This is the > normal reason for a more path-like device specification. > > If so then we must support it, even if it's not the usual way an > ordinary user would use it for a one-off. Otherwise you have to write > something in your config files for the VMs on your VM host, which will > break when someone plugs a keyboard into the `wrong' USB port. Unfortunately the busid isn't stable at least across reboots. 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). My pvUSB backend in qemu will accept all three variants of device specification, so may be libxl should do so, too. Juergen