From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58219) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXqzU-0001iJ-RB for qemu-devel@nongnu.org; Fri, 04 Sep 2015 09:25:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZXqzR-0004Fc-J1 for qemu-devel@nongnu.org; Fri, 04 Sep 2015 09:25:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35036) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXqzR-0004Eh-EX for qemu-devel@nongnu.org; Fri, 04 Sep 2015 09:25:13 -0400 Message-ID: <1441373109.19555.7.camel@redhat.com> From: Gerd Hoffmann Date: Fri, 04 Sep 2015 15:25:09 +0200 In-Reply-To: <1441277113-30693-3-git-send-email-jgross@suse.com> References: <1441277113-30693-1-git-send-email-jgross@suse.com> <1441277113-30693-3-git-send-email-jgross@suse.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Patch V1 2/3] xen/usb: add capability for passing through isoc jobs to host devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juergen Gross Cc: xen-devel@lists.xensource.com, qemu-devel@nongnu.org, stefano.stabellini@eu.citrix.com On Do, 2015-09-03 at 12:45 +0200, Juergen Gross wrote: > When Xen is using the qemu usb framework for pure passthrough of I/Os > to host devices the handling of isoc jobs is rather complicated if > multiple isoc frames are transferred with one call. > > Instead of calling the framework with each frame individually, using > timers to avoid polling in a loop and sampling all responses to > construct a sum response for the user, just add a capability to > use the libusb isoc framework instead. This capability is selected > via a device specific property. > > When the property is selected the host usb driver will use xen specific > callbacks to signal the end of isoc I/Os. For now these callbacks will > just be nops, they'll be filled with sensible actions when the xen > pv-usb backend is being added. So you basically add support for async isoc requests. Fine. There is nothing xen specific in this though, except that xen is (so far) the only user. It isn't going to work for uhci and ehci, put possibly xhci can join the party. So, the signaling needs to be different. The host adapter needs to signal somehow that it can handle async iso packets. One way would be to flag this per usb bus, another one per usb packet. Also all xen naming and the xen inlude should go away. BTW: does this build without xen-devel installed? Can we get rid of the callbacks? By filling the USBPacket iovec with the iso request chunks for example? cheers, Gerd From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: Re: [Patch V1 2/3] xen/usb: add capability for passing through isoc jobs to host devices Date: Fri, 04 Sep 2015 15:25:09 +0200 Message-ID: <1441373109.19555.7.camel@redhat.com> References: <1441277113-30693-1-git-send-email-jgross@suse.com> <1441277113-30693-3-git-send-email-jgross@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1441277113-30693-3-git-send-email-jgross@suse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org To: Juergen Gross Cc: xen-devel@lists.xensource.com, qemu-devel@nongnu.org, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On Do, 2015-09-03 at 12:45 +0200, Juergen Gross wrote: > When Xen is using the qemu usb framework for pure passthrough of I/Os > to host devices the handling of isoc jobs is rather complicated if > multiple isoc frames are transferred with one call. > > Instead of calling the framework with each frame individually, using > timers to avoid polling in a loop and sampling all responses to > construct a sum response for the user, just add a capability to > use the libusb isoc framework instead. This capability is selected > via a device specific property. > > When the property is selected the host usb driver will use xen specific > callbacks to signal the end of isoc I/Os. For now these callbacks will > just be nops, they'll be filled with sensible actions when the xen > pv-usb backend is being added. So you basically add support for async isoc requests. Fine. There is nothing xen specific in this though, except that xen is (so far) the only user. It isn't going to work for uhci and ehci, put possibly xhci can join the party. So, the signaling needs to be different. The host adapter needs to signal somehow that it can handle async iso packets. One way would be to flag this per usb bus, another one per usb packet. Also all xen naming and the xen inlude should go away. BTW: does this build without xen-devel installed? Can we get rid of the callbacks? By filling the USBPacket iovec with the iso request chunks for example? cheers, Gerd