From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH V6 3/7] libxl: add pvusb API Date: Fri, 11 Sep 2015 14:26:58 +0100 Message-ID: <1441978018.3549.33.camel@citrix.com> References: <1439202928-24813-1-git-send-email-cyliu@suse.com> <1439202928-24813-4-git-send-email-cyliu@suse.com> <1441721852.24450.120.camel@citrix.com> <55F2F64F02000066000508CA@relay2.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <55F2F64F02000066000508CA@relay2.provo.novell.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: Chun Yan Liu , xen-devel@lists.xen.org Cc: Juergen Gross , wei.liu2@citrix.com, george.dunlap@eu.citrix.com, Ian.Jackson@eu.citrix.com, Jim Fehlig , Simon Cao List-Id: xen-devel@lists.xenproject.org On Thu, 2015-09-10 at 23:42 -0600, Chun Yan Liu wrote: > > > Do these fields have any particular size requirements arising from e.g. the > > USB spec or from possible dom0 implementations? > > > > If they have a well defined fixed size from a USB spec then maybe we > > could > > use the appropriate fixed size types? > > Di> dn't see the size limitation. In Linux kernel code, busnum and devnum (here > 'hostbus, hostaddr') are both 'int' type. Is that a Linux-specific implementation detail or a fundamental property of USB? We should be designing the interface around Linux implementation details. It seems like something in the USB spec ought to define precisely the number of bits in both a bus number and a device address within that bus. Note also that integer in the libxl IDL is signed 24 bits. > And idProduct and idVendor are 'u16'. That's a USB spec thing, I think, so int16 in the IDL seems appropriate. Ian.