From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH V7 6/7] xl: add usb-assignable-list command Date: Wed, 7 Oct 2015 12:55:02 +0100 Message-ID: <1444218902.1410.25.camel@citrix.com> References: <1443147102-6471-1-git-send-email-cyliu@suse.com> <1443147102-6471-7-git-send-email-cyliu@suse.com> <5613FCE7.5080002@citrix.com> <1444207207.5302.269.camel@citrix.com> <1444216188.5302.333.camel@citrix.com> <5614FFF1.20304@citrix.com> <56150132.1040305@suse.com> <1444217988.1410.15.camel@citrix.com> <561506C5.6050205@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <561506C5.6050205@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 , George Dunlap , George Dunlap Cc: Ian Jackson , Jim Fehlig , Wei Liu , Chunyan Liu , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Wed, 2015-10-07 at 13:49 +0200, Juergen Gross wrote: > On 10/07/2015 01:39 PM, Ian Campbell wrote: > > On Wed, 2015-10-07 at 13:25 +0200, Juergen Gross wrote: > > > > The "usb-assignable-list" that Chunyan has submitted will give you > > > > a > > > > list of all dom0 USB devices that have not yet been assigned to a > > > > guest. > > > > It should be basically equivalent to "lsusb", except that it > > > > filters > > > > out devices which have already been assigned to VMs. > > > > Right, that does sound like useful enough functionality to justify not > > just > > using lsusb. > > > > > > In the e-mail you respond to, I was suggesting that > > > > > > > > # xl usb-list --all > > > > > > > > would show you usb devices attached to every VM, and also USB > > > > devices > > > > attached to no VM, and that > > > > And would "xl usb-list" list all domain attached to every VM but not > > the > > unattached ones? > > > > > > # xl usb-list --host > > > > > > > > would show you only host usb devices not attached to any VM. > > > > > > > > I think it's the second bit if functionality which Juergen is keen > > > > be > > > > available in some form or other. > > > > > > Exactly. > > > > I'm happy with this proposal too. > > > > Is the distinction between --host and --all important to you? Assuming > > unassigned devices are clearly indicated in the --all output (as they > > should be). > > Depends on how the output would look like. > > In case it either isn't containing VMs without any attached USB device > or the unassigned devices are listed at the end this would be okay. I > just wouldn't want to have to scroll a lot in case of a host with 1000 > domains. Makes sense. > BTW: In case you don't have the --host option it would be nice to omit > --all as well and just assume --all when no domain was specified (like > xl list). I think "xl usb-list" should list the devices attached to all domains, for sure. I'm ambivalent about whether it also lists unattached devices (in which case --all is unnecessary) or if --all is required to get those. Ian.