From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v3 1/3] libxl/cpumap: Add xc_cpumap_[setcpu, clearcpu, testcpu] to complement xc_cpumap_alloc. Date: Tue, 24 Mar 2015 17:46:04 +0000 Message-ID: <1427219164.10784.7.camel@citrix.com> References: <1427211559-15185-1-git-send-email-konrad.wilk@oracle.com> <1427211559-15185-2-git-send-email-konrad.wilk@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YaSv6-0007QV-FR for xen-devel@lists.xenproject.org; Tue, 24 Mar 2015 17:47:16 +0000 In-Reply-To: <1427211559-15185-2-git-send-email-konrad.wilk@oracle.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: Konrad Rzeszutek Wilk Cc: george.dunlap@eu.citrix.com, xen-devel@lists.xenproject.org, Dario Faggioli List-Id: xen-devel@lists.xenproject.org On Tue, 2015-03-24 at 11:39 -0400, Konrad Rzeszutek Wilk wrote: Please make sure you CC all of the toolstack maintainers. > +void xc_cpumap_clearcpu(int cpu, xc_cpumap_t map) > +{ > + clear_bit(cpu, (unsigned long *)map); Is it necessary to worry about alignment here, since xc_cpumap_t is actually a uint8_t*. I'm afraid I think it probably is on ARM at least, which is rather tedious. 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? I think we probably do, does anyone disagree with that assessment? Ian. [0] http://pubs.opengroup.org/onlinepubs/9699919799/functions/calloc.html#tag_16_39