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

Re: [RFC] Re: [Xen-devel] [PATCH] fix xenctl_cpumap translation to handle bitops accessed like arrays




On Dec 21, 2006, at 5:48 AM, Keir Fraser wrote:

On 20/12/06 19:05, "Jimi Xenidis" <jimix@xxxxxxxxxxxxxx> wrote:

Is this what you were looking for? let me know and I'll complete it.

-JX

How about functions long_to_byte_bitmap(bitmap, nr_bits) and
byte_to_long_bitmap(bitmap, nr_bits) defined in asm/bitops.h?

hmm, as I see it we have 3 interfaces that should remain compatible.
 1) The hvcall which uses a byte array
 2) The libxc calls where 2 use uint64_t and one uses uint32_t
3) The xm/xc.c call which constructs a python list using "C" ordering of the uint*_t word

so we would need similar interfaces in libxc and we would need a byte_to_uint{64,32}(), unless you want to change the libxc interfaces as well.


These would be
no-op for ia64 and x86, and could perform an in-place endian swap on each
longword on powerpc.

I see now (I'm not that familiar with x86) that bitops in x86 are "consistent" with "C" shifting so x86 experience no change, however is it worth optimizing this?
-JX

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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