From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juergen Gross Subject: Re: [PATCH V7 6/7] xl: add usb-assignable-list command Date: Wed, 7 Oct 2015 17:13:01 +0200 Message-ID: <5615367D.4010805@suse.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> <1444218902.1410.25.camel@citrix.com> <56150A6C.2080101@suse.com> <56151C3E.4000504@citrix.com> <5615241B.5@suse.com> <1444226703.1410.55.camel@citrix.com> <56152BA4.4080806@suse.com> <5615308F.3090105@suse.com> <5615342B.2050705@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5615342B.2050705@citrix.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: George Dunlap , George Dunlap Cc: Wei Liu , Ian Campbell , Ian Jackson , Chunyan Liu , "xen-devel@lists.xen.org" , Jim Fehlig List-Id: xen-devel@lists.xenproject.org On 10/07/2015 05:03 PM, George Dunlap wrote: > On 07/10/15 15:47, Juergen Gross wrote: >> On 10/07/2015 04:35 PM, George Dunlap wrote: >>> On Wed, Oct 7, 2015 at 3:26 PM, Juergen Gross wrote: >>>> On 10/07/2015 04:05 PM, Ian Campbell wrote: >>>>> >>>>> On Wed, 2015-10-07 at 15:54 +0200, Juergen Gross wrote: >>>>> >>>>>> Hmm, technically all unassigned USB-devices are usable from Dom0. >>>>>> So why >>>>>> not list them there. >>>>> >>>>> >>>>> I think you'd at least want to distinguish USB devices available to >>>>> dom0 >>>>> as >>>>> via a PCI host controller from those which are available via pvusb. >>>> >>>> >>>> Yeah, the non-pvusb devices should be listed as "assignable" if they >>>> are handled by a driver domain. >>>> >>>>> This also doesn't quite work when driver domains are in the picture. >>>> >>>> >>>> --host does? >>>> >>>> TBH: driver domains seem to be a reason to not support the --host >>>> option. So the options are --all or no special option. I'm still >>>> fine with both. >>> >>> I think the idea is that --host doesn't pretend to. But yes, if we >>> made it clear which devices were *assigned* to dom0 from another VM, >>> and which were *available from* dom0 to be assigned, then actually >>> that could be extended at some point in the future to include devices >>> available *from* driver domains. >>> >>> Alternately, perhaps we should just have >>> # xl usb-available [domain] >> >> Would work for me. >> >> Wait, wasn't there a similar command suggested? Something like >> "xl usb-assignable-list"? ;-) > > Indeed there was! A very useful command with a very sensible name... > unfortunately one with a very *similar* name to another command but with > different functionality. And this similarity even confused one of the > tools maintainers, so would almost certainly confuse our users. :-) > >>> Which will tell you the usb devices available to be assigned from that >>> domain; or all available usb devices from all driver domains. And of >>> course for the time being it only works on domain 0, but future >>> functionality could implement it for driver domains as well. >>> >>>> BTW: Do Xen concepts allow to assign a USB-device via pvUSB from a >>>> driver domain to Dom0? >>> >>> Sure, why not? >> >> With driver domains the picture is becoming more complicated. >> >> The main question now is: What is the real purpose of "xl usb-list"? >> Should it list the devices which are assigned to a domain, or should it >> list the devices which are usable by a domain (probably attributed >> whether the device is assignable to other domains)? > > For *all* of our other -list commands relating to guest devices -- > pci-list, disk-list, network-list, vtpm-list, channel-list, tmem-list -- > the list command shows the virtual devices *actually assigned to the > VM*. Based on that, the core information that any user will *expect* > from "usb-list" will be "what usb devices are assigned to this VM". > > I'm not opposed to extending usb-list to include extra useful > information; but it should be made clear to the user which information > is the "core expected" information (i.e., what usb devices are assigned > to this VM) and what is "extra" information (i.e., what usb devices are > available to be assigned *from* this VM). > > So I think we have 3 options that people don't find objectionable: > > 1. Add --all and --host options to usb-list. (Or perhaps, --available.) > > 2. Have usb-list also list "available" devices from driver domains, > clearly marked distinct from devices *assigned to* that driver domain > from another domain, and to begin with only working for dom0. > > 3. A new command, "usb-available" to list available devices from driver > domains, to begin with only working for dom0. > > I think I'd go for #3, but mostly I think we need to decide *something* > so we can move forward. +1 for both. :-) Juergen