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

[Xen-devel] Re: [RFC, PATCH 4/24] i386 Vmi inline implementation

To: virtualization@xxxxxxxxxxxxxx
Subject: [Xen-devel] Re: [RFC, PATCH 4/24] i386 Vmi inline implementation
From: Andi Kleen <ak@xxxxxxx>
Date: Wed, 22 Mar 2006 21:12:50 +0100
Cc: Zachary Amsden <zach@xxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Pratap Subrahmanyam <pratap@xxxxxxxxxx>, Wim Coekaerts <wim.coekaerts@xxxxxxxxxx>, Joshua LeVasseur <jtl@xxxxxxxxxx>, Dan Hecht <dhecht@xxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, Jack Lo <jlo@xxxxxxxxxx>, Christopher Li <chrisl@xxxxxxxxxx>, Chris Wright <chrisw@xxxxxxxx>, Linus Torvalds <torvalds@xxxxxxxx>, Anne Holler <anne@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxxxx>, Jyothy Reddy <jreddy@xxxxxxxxxx>, Kip Macy <kmacy@xxxxxxxxxxx>, Ky Srinivasan <ksrinivasan@xxxxxxxxxx>, Leendert van Doorn <leendert@xxxxxxxxxxxxxx>, Dan Arai <arai@xxxxxxxxxx>
Delivery-date: Thu, 23 Mar 2006 17:45:48 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <200603131802.k2DI22OK005657@xxxxxxxxxxxxxxxxxxx>
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: <200603131802.k2DI22OK005657@xxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.1
On Monday 13 March 2006 19:02, Zachary Amsden wrote:

> +#define MAKESTR(x)              #x
> +#define XSTR(x)                 MAKESTR(x)
> +#define XCONC(args...)               args
> +#define CONCSTR(x...)                #x
> +#define XCSTR(x...)          CONCSTR(x)

We have legions of these all over the tree. How about you put
them into some central file and gc a few?


> +/*
> + * Propagate these definitions as strings up to C code for convenient use
> + * in stringized assembler as pseudo-mnemonics; we must emit assembler
> + * directives to generate equates for the VMI_CALL_XXX symbols, since they
> + * will not be available otherwise to the assembler, and we can't emit
> + * the C versions of these functions from within an inline assembler
> + * string.
> + */
> +asm(".equ VMI_CALL_CUR, 0;\n\t");

The standard way to do this is to use asm-offsets.c



> +#define VDEF(call)                                           \
> +     asm (".equ VMI_CALL_" #call ", VMI_CALL_CUR;\n\t");     \
> +     asm (".equ VMI_CALL_CUR, VMI_CALL_CUR+1;\n\t");
> +VMI_CALLS

Hmmm? This doesn't look like something a header file should be doing.

How about you put that big list and the definition into a .c ?


> +#if defined(CONFIG_VMI_C_CONVENTION)

I don't think that file can be reviewed in any meaningful way before
you don't get rid of the macro mess and the unneeded calling conventions.


-Andi

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