[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 24/30] tools/libxc: Modify bitmap operations to take void pointers



On Wed, 2016-02-10 at 10:07 +0000, Andrew Cooper wrote:
> On 08/02/16 16:36, Ian Campbell wrote:
> > On Mon, 2016-02-08 at 16:23 +0000, Tim Deegan wrote:
> > > At 13:42 +0000 on 05 Feb (1454679737), Andrew Cooper wrote:
> > > > The type of the pointer to a bitmap is not interesting; it does not
> > > > affect the
> > > > representation of the block of bits being pointed to.
> > > It does affect the alignment, though.ÂÂIs this safe on ARM?
> > Good point. These constructs in the patch:
> > 
> > +ÂÂÂÂconst unsigned long *addr = _addr;
> > 
> > Would be broken if _addr were not suitably aligned for an unsigned
> > long.
> > 
> > That probably rules out this approach unfortunately.
> 
> What about reworking libxc bitops in terms of unsigned char?ÂÂThat
> should cover all alignment issues.

Assuming any asm or calls to __builtin_foo backends were adjusted to suite,
that would be ok, would that be compatible with the Xen side though?

Or you could make things a bit cleverer to do the
    const unsigned long *addr = _addr;
in a way which also forces the alignment and adjusts nr to compensate (I
don't see that 4 bytes of align is going to make addr point to e.g. a
different sort of memory to _addr).

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.