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: [Xen-devel] [PATCH] fix xenctl_cpumap translation to handle bitops a

To: Keir Fraser <keir@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] fix xenctl_cpumap translation to handle bitops accessed like arrays
From: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Date: Mon, 18 Dec 2006 11:50:30 -0500
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 18 Dec 2006 08:50:30 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C1AC0F2F.5FF0%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: <C1AC0F2F.5FF0%keir@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

On Dec 18, 2006, at 4:26 AM, Keir Fraser wrote:

On 17/12/06 5:53 pm, "Jimi Xenidis" <jimix@xxxxxxxxxxxxxx> wrote:

On PowerPC (and other big endian and/or RISC architectures) bit
offsets in a bitmap are actually represented by a bit-offset from an
element in an array rather than a bit-offset from the base memory
pointer,  see xen/include/asm-powerpc/bitops.h for a complete
explanation.

This complicates the conversion of cpumask_t from/to xenctl_cpumap.

The following patch allows an architecture to declare that bitops are
"by long" rather than "by bit" and use an alternate scheme for
encoding.

If the array-element type matters on big-endian systems then the tools
really need fixing: one libxc operation passes down a uint32_t unit;

Of the 3 usages only the tracebuffer mask uses uint32_t, maybe that could be repaired with the updated tracing work.

another
a uint64_t. Perhaps we should fix so they pass down 8-bit units (as the type of xenctl_cpumap_t would suggest) and then we could have byte_to_long_bitmap
and long_to_byte_bitmap in Xen

Are you suggesting to still use bits in the bytes?
If so, then do you want "C" ordering in the byte or arch bit ordering?
Perhaps we simply to us the byte array as a list of CPU numbers, with -1 to terminate?

(which might encourage us to pull proper
endianness headers into Xen).

I suspect that this is more "RISC thing" than an "Endian thing" since it is possible for little endian arch to use the array method (like ARM?).

Pulling in endian headers could be avoided.

-JX






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