From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v3 1/5] libxl: libxl_domain_need_memory shouldn't modify b_info Date: Wed, 15 Jun 2016 15:31:46 +0200 Message-ID: <1465997506.15816.262.camel@citrix.com> References: <1465983102-19308-1-git-send-email-wei.liu2@citrix.com> <1465983102-19308-2-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============9063712485569303599==" Return-path: Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDAvC-0008I6-0C for xen-devel@lists.xenproject.org; Wed, 15 Jun 2016 13:31:54 +0000 In-Reply-To: <1465983102-19308-2-git-send-email-wei.liu2@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Wei Liu , Xen-devel Cc: Ian Jackson List-Id: xen-devel@lists.xenproject.org --===============9063712485569303599== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-7JZNf73lie7CQt6DZLe6" --=-7JZNf73lie7CQt6DZLe6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2016-06-15 at 10:31 +0100, Wei Liu wrote: > This function is used to return the memory needed for a guest. It's > not > in a position to modify the b_info passed in (note the _setdefault > function). >=20 > Use a copy of b_info to do the calculation. Define a macro to mark > the > change in API. >=20 > Signed-off-by: Wei Liu > --- > Cc: Ian Jackson >=20 > v3: new > Any suggestion on the macro name? >=20 Maybe LIBXL_HAVE_DOMAIN_NEED_MEMORY_BINFO_CONST (a bit long, I know...) >=20 > diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h > index 2c0f868..905852d 100644 > --- a/tools/libxl/libxl.h > +++ b/tools/libxl/libxl.h > @@ -67,6 +67,13 @@ > =C2=A0 * the same $(XEN_VERSION) (e.g. throughout a major release). > =C2=A0 */ > =C2=A0 > +/* LIBXL_HAVE_DOMAIN_NEED_MEMORY_V2 > + * > + * If this is defined, libxl_domain_need_memory no longer modifies > + * passed in b_info. > + */ > +#define LIBXL_HAVE_DOMAIN_NEED_MEMORY_V2 > + > So, out of curiosity (or I should say "ignorance" :-)) how is one supposed to use this macro? Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-7JZNf73lie7CQt6DZLe6 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 iQIcBAABCAAGBQJXYVjCAAoJEBZCeImluHPuV68P/Au05jTjtRyrS8zyw1SYufxZ rGXwYD3gkhRDJ0FuznHzh6/RdwAqOjc9XRfvRFBh4+lxGKQVirE5fai6AzL4kuCb cWUQwu53T5H8URXyddrwng3KfNuxsZ+1negxm75deN016W1U5yhFXXmY43TsZ3hF yCQi9khdVRhFyaY/Ieni6NXhaCqHN0f6LPYwjsbgqsb6mWAvkazlVXKII94ZK7zH vAqrOPZ6osLPv3QvCNmrNQNk681gVoPyFbQ2+0A2NPr8u9JIyVtudP0ekYx/4yD3 PJzI5g5QhK8+CQRwBPpU1WTAkuGsgQ03KvGZ/GHEDxZo67F15wgRKfpYCEf7dpRK iTdCcClGXRGUXrRhyuVpVT5kee3L8j/jMmstQmMOFyjBwrzJ5k1QPH/NVpejq0Yq FZ7ySTZ8zoJ/CrvTssYsg+rdIHRkrqdX8MTzoVtdbo9MUOll5JT2Ipup1/sNIbp9 voc4wYbLVgwUv/z49dBTZQ6xk2alQj3EL8ZuG9+QyoiNisVIDFW8R94nf1yI4xfy ciE0upUJtt+QkdP0GB1GTv61ND2quSvNY9ne3c1u6f663rYwWpH+7oC7DIcwQqWJ xLbAGmBlN0e4InB8MzSu3+CJXFhJAq51jbxb4K6kVAq4jtYtIaMA3FlBb8NmiRWN mf8+1Zxb10qBRdEhDfaI =cBN/ -----END PGP SIGNATURE----- --=-7JZNf73lie7CQt6DZLe6-- --===============9063712485569303599== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --===============9063712485569303599==--