From: "Chun Yan Liu" Subject: Re: [PATCH V5 7/7] domcreate: support pvusb in configuration file Date: Wed, 05 Aug 2015 20:49:30 -0600 Message-ID: <55C33BBA0200006600055937@relay2.provo.novell.com> References: <1435226838-3067-1-git-send-email-cyliu@suse.com> <1435226838-3067-8-git-send-email-cyliu@suse.com> <55A38E2E.60509@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <55A38E2E.60509@suse.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org, Juergen Gross Cc: wei.liu2@citrix.com, ian.campbell@citrix.com, george.dunlap@eu.citrix.com, Ian.Jackson@eu.citrix.com, Jim Fehlig , Simon Cao List-Id: xen-devel@lists.xenproject.org >>> On 7/13/2015 at 06:08 PM, in message <55A38E2E.60509@suse.com>, Juergen Gross wrote: > On 06/25/2015 12:07 PM, Chunyan Liu wrote: > > Add code to support pvusb in domain config file. One could specify > > usbctrl and usb in domain's configuration file and create domain, > > then usb controllers will be created and usb device would be attached > > to guest automatically. > > > > One could specify usb controllers and usb devices in config file > > like this: > > usbctrl=['version=2,ports=4', 'version=1,ports=4', ] > > usbdev=['2.1,controller=0,port=1', ] > > > > Signed-off-by: Chunyan Liu > > Signed-off-by: Simon Cao > > I tested this patch and it still isn't working: > > config file: > > usbctrl = [ 'version=2,ports=4', ] > usbdev = [ '3.4,controller=0,port=1', ] > > xl create output: > > xl: libxl_event.c:1759: libxl__ao_inprogress_gc: Assertion > `!ao->complete' failed. There is a small fix about error handling after the testing version I sent to you, already included in the version posted here. With this version patch, this assertion problem should not exist. But as I ever mentioned before in V2, domain create with pvusb device in configuration file always fails. As I remembered the test with xend toolstack also fails in this case. I'm not sure the problem is in driver or in toolstack. > > I'm not sure, but comparing e.g. libxl__device_disk_add() with > libxl__device_usb_add() shows a significant difference regarding passing > of ao data. usb_add and disk_add do have something different. usb_add doesn't create new device in xenstore, it doesn't need to do wait_for_device_connection which waits for frontend/backend driver status change, so after adding usb device entry to xenstore, we can call libxl__ao_complete() directly. - Chunyan > I think you'll need a wrapper as in the disk case and pass NULL for ao > to the attach function being capable of async operation when you are > calling the attach function during domain creation. > > > Juergen >