From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v3 1/3] libxl/cpumap: Add xc_cpumap_[setcpu, clearcpu, testcpu] to complement xc_cpumap_alloc. Date: Wed, 25 Mar 2015 08:47:50 +0000 Message-ID: <1427273263.2560.227.camel@citrix.com> References: <1427211559-15185-1-git-send-email-konrad.wilk@oracle.com> <1427211559-15185-2-git-send-email-konrad.wilk@oracle.com> <1427219164.10784.7.camel@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5188767238041152053==" Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Yagyf-0000lv-3O for xen-devel@lists.xenproject.org; Wed, 25 Mar 2015 08:47:53 +0000 In-Reply-To: <1427219164.10784.7.camel@citrix.com> Content-Language: en-US List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: "xen-devel@lists.xenproject.org" , George Dunlap List-Id: xen-devel@lists.xenproject.org --===============5188767238041152053== Content-Language: en-US Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-uwxCUe01a+eThrtrO54e" --=-uwxCUe01a+eThrtrO54e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2015-03-24 at 17:46 +0000, Ian Campbell wrote: > On Tue, 2015-03-24 at 11:39 -0400, Konrad Rzeszutek Wilk wrote: > > +void xc_cpumap_clearcpu(int cpu, xc_cpumap_t map) > > +{ > > + clear_bit(cpu, (unsigned long *)map); >=20 > Is it necessary to worry about alignment here, since xc_cpumap_t is > actually a uint8_t*. > > [..] > > Or do we rely on all of these always being dynamically allocated (via > xc_cpumap_alloc) and therefore "suitably aligned so that it may be > assigned to a pointer to any type of object"[0] following calloc , > avoids the issue in practice? >=20 > I think we probably do, does anyone disagree with that assessment? >=20 FWIW, I agree with it. The only use case that deviates from that which I could find is: xc_vcpu_setaffinity() | --> xc_hypercall_bounce_pre() =3D=3D xc__hypercall_bounce_pre() | --> xc__hypercall_buffer_alloc() | --> xc__hypercall_buffer_alloc_pages() | --> hypercall_buffer_cache_alloc() || linux_privcmd_alloc_hypercall_buffer() (or OS speif= ic variants) which is probably still fine, isn't it? Regards, Dario --=-uwxCUe01a+eThrtrO54e 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 iEYEABECAAYFAlUSdjAACgkQk4XaBE3IOsTklACdEnLnujAQbcbCqzMUK5kdZCQf SI4An3eTNEFSDPdASe0XNN5o+KSAbdEM =+Sfv -----END PGP SIGNATURE----- --=-uwxCUe01a+eThrtrO54e-- --===============5188767238041152053== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============5188767238041152053==--