From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juergen Gross Subject: Re: [PATCH V3 4/6] xl: add pvusb commands Date: Thu, 21 May 2015 13:58:06 +0200 Message-ID: <555DC84E.9090302@suse.com> References: <1429415452-6161-1-git-send-email-cyliu@suse.com> <1429415452-6161-5-git-send-email-cyliu@suse.com> <5534B4D8.4010109@suse.com> <555C9B3A.6000906@suse.com> <555CA04F.20705@suse.com> <555CA77F.9030509@eu.citrix.com> <555D526C.4090603@suse.com> <555DB578.8070902@eu.citrix.com> <555DB8DE.50903@suse.com> <555DBD59.1070201@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <555DBD59.1070201@eu.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 Cc: Lars Kurth , Wei Liu , Ian Campbell , Chunyan Liu , "xen-devel@lists.xen.org" , Ian Jackson , Simon Cao List-Id: xen-devel@lists.xenproject.org On 05/21/2015 01:11 PM, George Dunlap wrote: > On 05/21/2015 11:52 AM, Juergen Gross wrote: >>> From your description, "xm usb-assignable-list" would list *all* USB >>> devices on the system which were available to be assigned to a guest. >>> >>> "xl pci-assignable-list" does *not* list all PCI devices on a system >>> which are available to be assigned. It lists the ones which can be >>> assigned without the "seize=1" parameter -- the ones you've already done >>> something with. It won't tell you about the other devices on the system >>> which have not yet been assigned to pciback. >> >> So "xl pci-assignable-list" is suppressing some of the PCI devices which >> in theory could be assigned. I don't think this "weird" behaviour should >> be mimicked by "xl usb-assignable-list". > > That's not really an accurate characterization. I introduced the > concept of "assignable" because under xm, you had to manually much about > in sysfs yourself to assign the device to pciback before attaching it to > a guest. So "pci-assignable-add" takes a device and assigns it to > pciback; "pci-attach" attaches an assignable device to the guest. > "pci-assignable-list" lists the devices which have been made > "assignable" under this new definition. > >> >>> Yes, from a pedantic perspective, both will tell you on which devices >>> you can run "X-attach" without any extra arguments. But from a >>> practical perspective, "xm usb-assignable-list" tells you something >>> practical about the state of devices on the whole system; and "xl >>> pci-assignable-list" tells you a technical quirk about devices are in a >>> half-way state between not being assigned and actually being assigned. >> >> I can't believe you are suggesting to use "a technical quirk" as a good >> example for future development. Just because a user interface isn't >> perfect shouldn't result in other interfaces to behave in the same >> imperfect way. > > You seem to have missed in my tone that I think "xm usb-assignable-list" > behavior is more useful. I said that "xm usb-assignable-list" gave you > practical information, and I said that "xl pci-assignable-list" gives > you about a technical quirk. I also said that "pci-assignable" a state > half-way in between being assigned and not assigned, which I personally > think portrays it as rather clunky. I didn't want to offend you, sorry if you felt that way. > I never claimed that we should make the new usb-*-list command mimic > pci-assignable-list. What I'm responding to is your claim that they do > similar things, and so implying that it should be OK for them to have > similar names. They do not do the similar things, and therefore they > must not have similar names. > > So, as I said in the previous e-mail: > * I think that it would definitely be useful to have the "xm > usb-assignable-list" functionality. > * But we cannot give it the same name as the current "xl > pci-assignable-list" functionality, since they behave differently > * I think "assignable" is the best name for what "xm > usb-assignable-list" does; however, > * We have existing users to consider; I think choosing a different name > (like "xl usb-available-list") will have the lowest negative impact on > existing users. There might be existing users who know about "xm usb-assignable-list". OTOH I don't care giving it another name, as long as the functionality is available. Juergen