From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 2/2] tools/libxl: Introduce LIBXL_CPUPOOL_POOLID_ANY Date: Wed, 8 Feb 2017 17:11:17 +0100 Message-ID: <1486570277.3042.6.camel@citrix.com> References: <1486565506-8541-1-git-send-email-george.dunlap@citrix.com> <1486565506-8541-2-git-send-email-george.dunlap@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6560312584419493445==" Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cbUqC-0003FN-4P for xen-devel@lists.xenproject.org; Wed, 08 Feb 2017 16:11:32 +0000 In-Reply-To: <1486565506-8541-2-git-send-email-george.dunlap@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: George Dunlap , xen-devel@lists.xenproject.org Cc: Juergen Gross , Ian Jackson , Wei Liu , Ronald Rojas List-Id: xen-devel@lists.xenproject.org --===============6560312584419493445== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-Ou2WFxqL5Wvs9nW/a9lm" --=-Ou2WFxqL5Wvs9nW/a9lm Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2017-02-08 at 14:51 +0000, George Dunlap wrote: > Callers to libxl_cpupool_create() can either request a specific pool > id, or request that Xen do it for them.=C2=A0=C2=A0But at the moment, the > "automatic" selection is indicated by using a magic value, 0.=C2=A0=C2=A0= This > is > undesirable both because it doesn't obviously have meaning, but also > because '0' is a valid cpupool (albeit one which at the moment can't > be changed). >=20 > Introduce a constant, LIBXL_CPUPOOL_POOLID_ANY, to indicate this > instead.=C2=A0=C2=A0Still accept '0' as meaning "ANY" for backwards > compatibility. >=20 > Signed-off-by: George Dunlap > Reviewed-by: Dario Faggioli With one remark. > diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c > --- a/tools/libxl/libxl.h > +++ b/tools/libxl/libxl.h > @@ -2086,6 +2086,12 @@ int libxl_tmem_shared_auth(libxl_ctx *ctx, > uint32_t domid, char* uuid, > =C2=A0int libxl_tmem_freeable(libxl_ctx *ctx); > =C2=A0 > =C2=A0int libxl_get_freecpus(libxl_ctx *ctx, libxl_bitmap *cpumap); > + > +/*=C2=A0 > + * Set poolid to LIBXL_CPUOOL_POOLID_ANY to have Xen choose a > + * free poolid for you. > + */ > +#define LIBXL_CPUPOOL_POOLID_ANY 0xFFFFFFFF > Do we want this to be here, or in libxl_types.idl. Asking because, AFAICT, it's the only one LIBXL_FOO_BAR defined like this. I appreciate that there's few point in making this an enum, as it is only one value, and will most likely remain so, but still, I thought I'd at least bring this up. FWIW, my Reviewed-by stands both if it is kept as is, and if it is moved to IDL. Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-Ou2WFxqL5Wvs9nW/a9lm 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 v2 iQIcBAABCAAGBQJYm0MmAAoJEBZCeImluHPuJsEQAMqYeArDedkNovfXz0XWlstg gjn+7hnxLALBAkgmx+2P/rg/baoJ7v/KAHaFQH86wF9ZGImjmOry/2usbWULwBpC pzOAt+k059ujMHoNDDtxj+B+/HOR+RA66JY3CH87Iy9uL12H9hOhIT1pyK26b4LU NeK2n1WDrxZ/2GfQIprLr+0MUwCWATrQRGrvtyHUxVxYQTYrjG6ALau9eyPp/Zf6 9Q/zhEk1hkH5Zh04IVAGdSBKpzh3nJ/BnBtJ7KSlaf7JIOn6ywy+LvvjLU1hVNka 4cDX37vScvzIQlSeNMvOXTWg1oCOnIfjd4PB9HekHJO4SpgQoCB7R4aDhu81mmR6 fObuuMyueiKp9ri4dsuZYLQzz7M/mUUG9/qJ3M+GmO22j+xZnkVKLOvDWSqIP/47 NC5XOKymJWksBTG3NPKssb9JE+uI6TaZsPNZorGe04m0Ivg/uwtErGGO6Qfs7HS9 MfliOYXauuMlPDXVDpep+em6GTzEC94XVnAr9ur23H3VPFC7L/zCicithZAmO8UI Tpk2pYw3Mkzeak3mf9Oo5eqTdhBaJDTlSM6pdXE/gldUG8SH1j7ubiQLTbROLs6q XQBfTcPepPILoRKXlcDvyi9vzDNJg+sEgjzs2MWaNtm5yxaQiBqNr60rJGK+GJ/F t440Ytv2E+xFIo0PYgY+ =Lx+W -----END PGP SIGNATURE----- --=-Ou2WFxqL5Wvs9nW/a9lm-- --===============6560312584419493445== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============6560312584419493445==--