WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [RFC] Re: [Xen-devel] [PATCH] fix xenctl_cpumap translation to handl

To: Keir Fraser <keir@xxxxxxxxxxxxx>
Subject: Re: [RFC] Re: [Xen-devel] [PATCH] fix xenctl_cpumap translation to handle bitops accessed like arrays
From: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Date: Thu, 21 Dec 2006 12:32:15 -0500
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 21 Dec 2006 09:32:10 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C1B0170D.6AED%keir@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C1B0170D.6AED%keir@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

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