From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49768) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxcNS-00019B-ES for qemu-devel@nongnu.org; Fri, 12 Jul 2013 08:23:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UxcED-00018f-0S for qemu-devel@nongnu.org; Fri, 12 Jul 2013 08:13:51 -0400 Received: from smtp.eu.citrix.com ([46.33.159.39]:24972) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxcEC-000189-Mz for qemu-devel@nongnu.org; Fri, 12 Jul 2013 08:13:36 -0400 Message-ID: <1373631197.23972.13.camel@Abyss> From: Dario Faggioli Date: Fri, 12 Jul 2013 14:13:17 +0200 In-Reply-To: <51DFC1C9.4010605@m2r.biz> References: <1373538837-4811-1-git-send-email-fabio.fantoni@m2r.biz> <1373558165.12772.40.camel@Solace> <51DFC1C9.4010605@m2r.biz> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-ggBtLADl3TNDnLLvWK+c" MIME-Version: 1.0 Subject: Re: [Qemu-devel] [Xen-devel] [PATCH v2] libxl: usb2 and usb3 controller support for upstream qemu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fabio Fantoni Cc: xen-devel@lists.xensource.com, Ian.Campbell@citrix.com, Stefano.Stabellini@eu.citrix.com, George.Dunlap@eu.citrix.com, wei.lui2@citrix.com, Ian.Jackson@eu.citrix.com, qemu-devel@nongnu.org, pbonzini@redhat.com --=-ggBtLADl3TNDnLLvWK+c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On ven, 2013-07-12 at 10:43 +0200, Fabio Fantoni wrote: > Il 11/07/2013 17:56, Dario Faggioli ha scritto: > >> Signed-off-by: Fabio Fantoni > >> > >> diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl > >> index d218a2d..b4c6921 100644 > >> --- a/tools/libxl/libxl_types.idl > >> +++ b/tools/libxl/libxl_types.idl > >> @@ -325,6 +325,7 @@ libxl_domain_build_info =3D Struct("domain_build_i= nfo",[ > >> ("serial", string), > >> ("boot", string), > >> ("usb", libxl_de= fbool), > >> + ("usbversion", in= teger), > >> # usbdevice: > >> # - "tablet" for absolute mou= se, > >> # - "mouse" for PS/2 protocol= relative mouse > >> > > I believe this calls for a `#define LIBXL_HAVE_USBVERSION' (or somethin= g > > like that) in libxl.h, doesn't it? > > Is it necessary even if I just want to apply it to xen 4.4 (as a new=20 > features) and not backport it to older versions? > Although API stability is something I'm not sure I fully master, I would say, yes it is necessary. :-) > Or probably I don't understand exactly what is the function of LIBXL_HAVE= _*. > The point is to allow people to write code suitable for _all_ versions of libxl. So, imagine, in the super cool toolstack I'm writing on top of libxl, I want to use your new parameter, if it's there, i.e., if compiling on top of 4.4, but I also want the code to compile against libxl 4.3. With the LIBXL_HAVE_*, I can do something like this: ... binfo.usb =3D true; #ifdef LIBXL_HAVE_BUILDINFO_USBVERSION binfo.usbversion =3D 3; #endif ... Does that make sense? > I tried to grep all code for LIBXL_HAVE_* to see an example of use but I= =20 > found only one an I don't understand. > Try harder! :-) http://xenbits.xen.org/gitweb/?p=3Dxen.git&a=3Dsearch&h=3Drefs%2Fheads%2Fst= aging&st=3Dcommit&s=3DLIBXL_HAVE_ http://xenbits.xen.org/gitweb/?p=3Dxen.git&a=3Dsearch&h=3DHEAD&st=3Dgrep&s= =3DLIBXL_HAVE_ Actually, while at it, given LIBXL_HAVE_BUILDINFO_USBDEVICE_LIST is added in ac16730d0339d41fd7d1, I'd go for LIBXL_HAVE_BUILDINFO_USBVERSION for yours, it looks more consistent. Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-ggBtLADl3TNDnLLvWK+c Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) iEYEABECAAYFAlHf8t0ACgkQk4XaBE3IOsSLmACdFchac46yZPcmCnN2ca5Cm+An f+sAnRvEHbfwUbHcsScbqhXyHQISkiNH =8pIr -----END PGP SIGNATURE----- --=-ggBtLADl3TNDnLLvWK+c--