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

[Xen-changelog] Fix Xen public interfaces and the tools to consistently



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID b3a255e88810233f4a43d769c549b490a4d99725
# Parent  067b9aacb6c2c0920829f925352d66b4783b8f2c
Fix Xen public interfaces and the tools to consistently
use stdint-format bitsize types (uint32_t and friends).

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 067b9aacb6c2 -r b3a255e88810 tools/blktap/parallax/block-async.c
--- a/tools/blktap/parallax/block-async.c       Wed Oct 12 09:11:35 2005
+++ b/tools/blktap/parallax/block-async.c       Wed Oct 12 10:07:37 2005
@@ -31,11 +31,11 @@
  */
 
 struct read_args {
-    u64 addr;
+    uint64_t addr;
 };
 
 struct write_args {
-    u64   addr;
+    uint64_t   addr;
     char *block;
 };
 
@@ -94,7 +94,7 @@
                
 } 
 
-void block_read(u64 addr, io_cb_t cb, void *param)
+void block_read(uint64_t addr, io_cb_t cb, void *param)
 {
     struct pending_io_req *req;
     
@@ -113,7 +113,7 @@
 }
 
 
-void block_write(u64 addr, char *block, io_cb_t cb, void *param)
+void block_write(uint64_t addr, char *block, io_cb_t cb, void *param)
 {
     struct pending_io_req *req;
     
diff -r 067b9aacb6c2 -r b3a255e88810 tools/blktap/parallax/block-async.h
--- a/tools/blktap/parallax/block-async.h       Wed Oct 12 09:11:35 2005
+++ b/tools/blktap/parallax/block-async.h       Wed Oct 12 10:07:37 2005
@@ -14,7 +14,7 @@
 {
     enum {IO_ADDR_T, IO_BLOCK_T, IO_INT_T} type;
     union {
-        u64   a;
+        uint64_t   a;
         char *b;
         int   i;
     } u;
@@ -38,8 +38,8 @@
 };
 void radix_lock_init(struct radix_lock *r);
 
-void block_read(u64 addr, io_cb_t cb, void *param);
-void block_write(u64 addr, char *block, io_cb_t cb, void *param);
+void block_read(uint64_t addr, io_cb_t cb, void *param);
+void block_write(uint64_t addr, char *block, io_cb_t cb, void *param);
 void block_alloc(char *block, io_cb_t cb, void *param);
 void block_rlock(struct radix_lock *r, int row, io_cb_t cb, void *param);
 void block_wlock(struct radix_lock *r, int row, io_cb_t cb, void *param);
@@ -47,7 +47,7 @@
 void block_wunlock(struct radix_lock *r, int row, io_cb_t cb, void *param);
 void init_block_async(void);
 
-static inline u64 IO_ADDR(struct io_ret r)
+static inline uint64_t IO_ADDR(struct io_ret r)
 {
     assert(r.type == IO_ADDR_T);
     return r.u.a;
diff -r 067b9aacb6c2 -r b3a255e88810 tools/blktap/parallax/blockstore.c
--- a/tools/blktap/parallax/blockstore.c        Wed Oct 12 09:11:35 2005
+++ b/tools/blktap/parallax/blockstore.c        Wed Oct 12 10:07:37 2005
@@ -132,9 +132,9 @@
 #define ENTER_LUID_CR pthread_mutex_lock(&ptmutex_luid)
 #define LEAVE_LUID_CR pthread_mutex_unlock(&ptmutex_luid)
 
-static u64 luid_cnt = 0x1000ULL;
-u64 new_luid(void) {
-    u64 luid;
+static uint64_t luid_cnt = 0x1000ULL;
+uint64_t new_luid(void) {
+    uint64_t luid;
     ENTER_LUID_CR;
     luid = luid_cnt++;
     LEAVE_LUID_CR;
@@ -539,7 +539,7 @@
  * Reading                                                                   *
  *****************************************************************************/
 
-void *readblock_indiv(int server, u64 id) {
+void *readblock_indiv(int server, uint64_t id) {
     void *block;
     bsq_t *qe;
     int len, rc;
@@ -616,9 +616,9 @@
  *
  *   @return: pointer to block, NULL on error
  */
-void *readblock(u64 id) {
+void *readblock(uint64_t id) {
     int map = (int)BSID_MAP(id);
-    u64 xid;
+    uint64_t xid;
     static int i = CLUSTER_MAX_REPLICAS - 1;
     void *block = NULL;
 
@@ -670,7 +670,7 @@
  * Writing                                                                   *
  *****************************************************************************/
 
-bsq_t *writeblock_indiv(int server, u64 id, void *block) {
+bsq_t *writeblock_indiv(int server, uint64_t id, void *block) {
 
     bsq_t *qe;
     int len;
@@ -709,7 +709,7 @@
  *
  *   @return: zero on success, -1 on failure
  */
-int writeblock(u64 id, void *block) {
+int writeblock(uint64_t id, void *block) {
     
     int map = (int)BSID_MAP(id);
     int rep0 = bsclusters[map].servers[0];
@@ -805,11 +805,11 @@
  *
  *   @return: new id of block on disk
  */
-u64 allocblock(void *block) {
+uint64_t allocblock(void *block) {
     return allocblock_hint(block, 0);
 }
 
-bsq_t *allocblock_hint_indiv(int server, void *block, u64 hint) {
+bsq_t *allocblock_hint_indiv(int server, void *block, uint64_t hint) {
     bsq_t *qe;
     int len;
 
@@ -846,14 +846,14 @@
  *
  *   @return: new id of block on disk
  */
-u64 allocblock_hint(void *block, u64 hint) {
+uint64_t allocblock_hint(void *block, uint64_t hint) {
     int map = (int)hint;
     int rep0 = bsclusters[map].servers[0];
     int rep1 = bsclusters[map].servers[1];
     int rep2 = bsclusters[map].servers[2];
     bsq_t *reqs[3];
     int rc;
-    u64 id0, id1, id2;
+    uint64_t id0, id1, id2;
 
     reqs[0] = reqs[1] = reqs[2] = NULL;
 
@@ -938,7 +938,7 @@
  *   @return: pointer to block, NULL on error
  */
 
-void *readblock(u64 id) {
+void *readblock(uint64_t id) {
     void *block;
     int block_fp;
    
@@ -980,7 +980,7 @@
  *
  *   @return: zero on success, -1 on failure
  */
-int writeblock(u64 id, void *block) {
+int writeblock(uint64_t id, void *block) {
     
     int block_fp;
     
@@ -1014,8 +1014,8 @@
  *   @return: new id of block on disk
  */
 
-u64 allocblock(void *block) {
-    u64 lb;
+uint64_t allocblock(void *block) {
+    uint64_t lb;
     off64_t pos;
     int block_fp;
     
@@ -1057,7 +1057,7 @@
  *
  *   @return: new id of block on disk
  */
-u64 allocblock_hint(void *block, u64 hint) {
+uint64_t allocblock_hint(void *block, uint64_t hint) {
     return allocblock(block);
 }
 
@@ -1109,7 +1109,7 @@
     return fb;
 }
 
-void releaseblock(u64 id)
+void releaseblock(uint64_t id)
 {
     blockstore_super_t *bs_super;
     freeblock_t *fl_current;
@@ -1154,7 +1154,7 @@
 {
     blockstore_super_t *bs_super;
     freeblock_t *fb;
-    u64 total = 0, next;
+    uint64_t total = 0, next;
     
     bs_super = (blockstore_super_t *) readblock(BLOCKSTORE_SUPER);
     
@@ -1205,7 +1205,7 @@
 {
     int i;
     blockstore_super_t *bs_super;
-    u64 ret;
+    uint64_t ret;
     int block_fp;
     
 #ifdef BLOCKSTORE_REMOTE
diff -r 067b9aacb6c2 -r b3a255e88810 tools/blktap/parallax/blockstore.h
--- a/tools/blktap/parallax/blockstore.h        Wed Oct 12 09:11:35 2005
+++ b/tools/blktap/parallax/blockstore.h        Wed Oct 12 10:07:37 2005
@@ -21,33 +21,33 @@
 #define SECTOR_SHIFT   9 
 #endif
 
-#define FREEBLOCK_SIZE  (BLOCK_SIZE / sizeof(u64)) - (3 * sizeof(u64))
+#define FREEBLOCK_SIZE  (BLOCK_SIZE / sizeof(uint64_t)) - (3 * 
sizeof(uint64_t))
 #define FREEBLOCK_MAGIC 0x0fee0fee0fee0feeULL
 
 typedef struct {
-    u64 magic;
-    u64 next;
-    u64 count;
-    u64 list[FREEBLOCK_SIZE];
+    uint64_t magic;
+    uint64_t next;
+    uint64_t count;
+    uint64_t list[FREEBLOCK_SIZE];
 } freeblock_t; 
 
 #define BLOCKSTORE_MAGIC 0xaaaaaaa00aaaaaaaULL
 #define BLOCKSTORE_SUPER 1ULL
 
 typedef struct {
-    u64 magic;
-    u64 freelist_full;
-    u64 freelist_current;
+    uint64_t magic;
+    uint64_t freelist_full;
+    uint64_t freelist_current;
 } blockstore_super_t;
 
 extern void *newblock();
-extern void *readblock(u64 id);
-extern u64 allocblock(void *block);
-extern u64 allocblock_hint(void *block, u64 hint);
-extern int writeblock(u64 id, void *block);
+extern void *readblock(uint64_t id);
+extern uint64_t allocblock(void *block);
+extern uint64_t allocblock_hint(void *block, uint64_t hint);
+extern int writeblock(uint64_t id, void *block);
 
 /* Add this blockid to a freelist, to be recycled by the allocator. */
-extern void releaseblock(u64 id);
+extern void releaseblock(uint64_t id);
 
 /* this is a memory free() operation for block-sized allocations */
 extern void freeblock(void *block);
@@ -55,17 +55,17 @@
 
 /* debug for freelist. */
 void freelist_count(int print_each);
-#define ALLOCFAIL (((u64)(-1)))
+#define ALLOCFAIL (((uint64_t)(-1)))
 
 /* Distribution
  */
 #define BLOCKSTORED_PORT 9346
 
 struct bshdr_t_struct {
-    u32            operation;
-    u32            flags;
-    u64            id;
-    u64            luid;
+    uint32_t            operation;
+    uint32_t            flags;
+    uint64_t            id;
+    uint64_t            luid;
 } __attribute__ ((packed));
 typedef struct bshdr_t_struct bshdr_t;
 
@@ -76,9 +76,9 @@
 
 typedef struct bsmsg_t_struct bsmsg_t;
 
-#define MSGBUFSIZE_OP    sizeof(u32)
-#define MSGBUFSIZE_FLAGS (sizeof(u32) + sizeof(u32))
-#define MSGBUFSIZE_ID    (sizeof(u32) + sizeof(u32) + sizeof(u64) + 
sizeof(u64))
+#define MSGBUFSIZE_OP    sizeof(uint32_t)
+#define MSGBUFSIZE_FLAGS (sizeof(uint32_t) + sizeof(uint32_t))
+#define MSGBUFSIZE_ID    (sizeof(uint32_t) + sizeof(uint32_t) + 
sizeof(uint64_t) + sizeof(uint64_t))
 #define MSGBUFSIZE_BLOCK sizeof(bsmsg_t)
 
 #define BSOP_READBLOCK  0x01
@@ -113,9 +113,9 @@
 #define BSID_REPLICA2(_id) (((_id)>>40)&0xfffffULL)
 #define BSID_MAP(_id)      (((_id)>>60)&0xfULL)
 
-#define BSID(_map, _rep0, _rep1, _rep2) ((((u64)(_map))<<60) | \
-                                         (((u64)(_rep2))<<40) | \
-                                         (((u64)(_rep1))<<20) | ((u64)(_rep0)))
+#define BSID(_map, _rep0, _rep1, _rep2) ((((uint64_t)(_map))<<60) | \
+                                         (((uint64_t)(_rep2))<<40) | \
+                                         (((uint64_t)(_rep1))<<20) | 
((uint64_t)(_rep0)))
 
 typedef struct bsserver_t_struct {
     char              *hostname;
diff -r 067b9aacb6c2 -r b3a255e88810 tools/blktap/parallax/blockstored.c
--- a/tools/blktap/parallax/blockstored.c       Wed Oct 12 09:11:35 2005
+++ b/tools/blktap/parallax/blockstored.c       Wed Oct 12 10:07:37 2005
@@ -21,9 +21,9 @@
 
 //#define BSDEBUG
 
-int readblock_into(u64 id, void *block);
-
-int open_socket(u16 port) {
+int readblock_into(uint64_t id, void *block);
+
+int open_socket(uint16_t port) {
     
     struct sockaddr_in sn;
     int sock;
@@ -75,7 +75,7 @@
         int rc, len;
         struct sockaddr_in from;
         size_t slen = sizeof(from);
-        u64 bid;
+        uint64_t bid;
 
         len = recvfrom(bssock, (void *)&msgbuf, sizeof(msgbuf), 0,
                        (struct sockaddr *)&from, &slen);
@@ -155,7 +155,7 @@
  *   @return: 0 if OK, other on error
  */
 
-int readblock_into(u64 id, void *block) {
+int readblock_into(uint64_t id, void *block) {
     if (lseek64(block_fp, ((off64_t) id - 1LL) * BLOCK_SIZE, SEEK_SET) < 0) {
         printf ("%Ld\n", (id - 1) * BLOCK_SIZE);
         perror("readblock lseek");
@@ -175,7 +175,7 @@
  *
  *   @return: zero on success, -1 on failure
  */
-int writeblock(u64 id, void *block) {
+int writeblock(uint64_t id, void *block) {
     if (lseek64(block_fp, ((off64_t) id - 1LL) * BLOCK_SIZE, SEEK_SET) < 0) {
         perror("writeblock lseek");
         return -1;
@@ -193,10 +193,10 @@
  *
  *   @return: new id of block on disk
  */
-static u64 lastblock = 0;
-
-u64 allocblock(void *block) {
-    u64 lb;
+static uint64_t lastblock = 0;
+
+uint64_t allocblock(void *block) {
+    uint64_t lb;
     off64_t pos;
 
     retry:
diff -r 067b9aacb6c2 -r b3a255e88810 tools/blktap/parallax/bstest.c
--- a/tools/blktap/parallax/bstest.c    Wed Oct 12 09:11:35 2005
+++ b/tools/blktap/parallax/bstest.c    Wed Oct 12 10:07:37 2005
@@ -22,7 +22,7 @@
 #include <errno.h>
 #include "blockstore.h"
 
-int direct(char *host, u32 op, u64 id, int len) {
+int direct(char *host, uint32_t op, uint64_t id, int len) {
     struct sockaddr_in sn, peer;
     int sock;
     bsmsg_t msgbuf;
@@ -99,8 +99,8 @@
 
 int main (int argc, char **argv) {
 
-    u32 op = 0;
-    u64 id = 0;
+    uint32_t op = 0;
+    uint64_t id = 0;
     int len = 0, rc;
     void *block;
 
diff -r 067b9aacb6c2 -r b3a255e88810 tools/blktap/parallax/parallax.c
--- a/tools/blktap/parallax/parallax.c  Wed Oct 12 09:11:35 2005
+++ b/tools/blktap/parallax/parallax.c  Wed Oct 12 10:07:37 2005
@@ -330,8 +330,8 @@
 struct cb_param {
     pending_t *pent;
     int       segment;
-    u64       sector; 
-    u64       vblock; /* for debug printing -- can be removed. */
+    uint64_t       sector; 
+    uint64_t       vblock; /* for debug printing -- can be removed. */
 };
 
 static void read_cb(struct io_ret r, void *in_param)
@@ -393,9 +393,9 @@
 int parallax_read(blkif_request_t *req, blkif_t *blkif)
 {
     blkif_response_t *rsp;
-    u64 vblock, gblock;
+    uint64_t vblock, gblock;
     vdi_t *vdi;
-    u64 sector;
+    uint64_t sector;
     int i;
     char *dpage, *spage;
     pending_t *pent;
@@ -475,9 +475,9 @@
 int parallax_write(blkif_request_t *req, blkif_t *blkif)
 {
     blkif_response_t *rsp;
-    u64 sector;
+    uint64_t sector;
     int i, writable = 0;
-    u64 vblock, gblock;
+    uint64_t vblock, gblock;
     char *spage;
     unsigned long size, offset, start;
     vdi_t *vdi;
diff -r 067b9aacb6c2 -r b3a255e88810 tools/blktap/parallax/radix.c
--- a/tools/blktap/parallax/radix.c     Wed Oct 12 09:11:35 2005
+++ b/tools/blktap/parallax/radix.c     Wed Oct 12 10:07:37 2005
@@ -33,7 +33,7 @@
 
 typedef struct rcache_st {
     radix_tree_node  *node;
-    u64               id;
+    uint64_t               id;
     struct rcache_st *hash_next;
     struct rcache_st *cache_next;
     struct rcache_st *cache_prev;
@@ -55,7 +55,7 @@
 }
     
 
-void rcache_write(u64 id, radix_tree_node *node)
+void rcache_write(uint64_t id, radix_tree_node *node)
 {
     rcache_t *r, *tmp, **curs;
     
@@ -135,7 +135,7 @@
     pthread_mutex_unlock(&rcache_mutex);
 }
 
-radix_tree_node *rcache_read(u64 id)
+radix_tree_node *rcache_read(uint64_t id)
 {
     rcache_t *r, *tmp;
     radix_tree_node *node = NULL;
@@ -181,7 +181,7 @@
 }
 
 
-void *rc_readblock(u64 id)
+void *rc_readblock(uint64_t id)
 {
     void *ret;
     
@@ -197,9 +197,9 @@
     return(ret);
 }
 
-u64 rc_allocblock(void *block)
-{
-    u64 ret;
+uint64_t rc_allocblock(void *block)
+{
+    uint64_t ret;
     
     ret = allocblock(block);
     
@@ -209,7 +209,7 @@
     return(ret);
 }
 
-int rc_writeblock(u64 id, void *block)
+int rc_writeblock(uint64_t id, void *block)
 {
     int ret;
     
@@ -233,9 +233,9 @@
  * whether or not the block is writable, including the return
  * values of update and snapshot
  */
-u64 lookup(int height, u64 root, u64 key);
-u64 update(int height, u64 root, u64 key, u64 val);
-u64 snapshot(u64 root);
+uint64_t lookup(int height, uint64_t root, uint64_t key);
+uint64_t update(int height, uint64_t root, uint64_t key, uint64_t val);
+uint64_t snapshot(uint64_t root);
 
 /**
  * cloneblock: clone an existing block in memory
@@ -264,9 +264,9 @@
  *   @return: value on success, zero on error
  */
 
-u64 lookup(int height, u64 root, u64 key) {
+uint64_t lookup(int height, uint64_t root, uint64_t key) {
     radix_tree_node node;
-    u64 mask = ONE;
+    uint64_t mask = ONE;
     
     assert(key >> height == 0);
 
@@ -275,7 +275,7 @@
 
     /* now carve off equal sized chunks at each step */
     for (;;) {
-        u64 oldroot;
+        uint64_t oldroot;
 
 #ifdef DEBUG
         printf("lookup: height=%3d root=%3Ld offset=%3d%s\n", height, root,
@@ -314,9 +314,9 @@
  *   @returns: (possibly new) root id on success (with LSB=1), 0 on failure
  */
 
-u64 update(int height, u64 root, u64 key, u64 val) {
+uint64_t update(int height, uint64_t root, uint64_t key, uint64_t val) {
     int offset;
-    u64 child;
+    uint64_t child;
     radix_tree_node node;
     
     /* base case--return val */
@@ -390,7 +390,7 @@
  *
  *   @return: new root node, 0 on error
  */
-u64 snapshot(u64 root) {
+uint64_t snapshot(uint64_t root) {
     radix_tree_node node, newnode;
 
     if ((node = rc_readblock(getid(root))) == NULL)
@@ -418,7 +418,7 @@
  * child are okay...)
  */
 
-int collapse(int height, u64 proot, u64 croot)
+int collapse(int height, uint64_t proot, uint64_t croot)
 {
     int i, numlinks, ret, total = 0;
     radix_tree_node pnode, cnode;
@@ -480,7 +480,7 @@
 }
 
 
-void print_root(u64 root, int height, FILE *dot_f)
+void print_root(uint64_t root, int height, FILE *dot_f)
 {
     FILE *f;
     int i;
@@ -558,9 +558,9 @@
 #ifdef RADIX_STANDALONE
 
 int main(int argc, char **argv) {
-    u64 key = ZERO, val = ZERO;
-    u64 root = writable(2ULL);
-    u64 p = ZERO, c = ZERO;
+    uint64_t key = ZERO, val = ZERO;
+    uint64_t root = writable(2ULL);
+    uint64_t p = ZERO, c = ZERO;
     int v;
     char buff[4096];
 
diff -r 067b9aacb6c2 -r b3a255e88810 tools/blktap/parallax/radix.h
--- a/tools/blktap/parallax/radix.h     Wed Oct 12 09:11:35 2005
+++ b/tools/blktap/parallax/radix.h     Wed Oct 12 10:07:37 2005
@@ -24,7 +24,7 @@
 #define RADIX_TREE_MAP_MASK 0x1ff
 #define RADIX_TREE_MAP_ENTRIES 512
 
-typedef u64 *radix_tree_node;
+typedef uint64_t *radix_tree_node;
 
 
 /*
@@ -33,11 +33,11 @@
  * whether or not the block is writable, including the return
  * values of update and snapshot
  */
-u64 lookup(int height, u64 root, u64 key);
-u64 update(int height, u64 root, u64 key, u64 val);
-u64 snapshot(u64 root);
-int collapse(int height, u64 proot, u64 croot);
-int isprivate(int height, u64 root, u64 key);
+uint64_t lookup(int height, uint64_t root, uint64_t key);
+uint64_t update(int height, uint64_t root, uint64_t key, uint64_t val);
+uint64_t snapshot(uint64_t root);
+int collapse(int height, uint64_t proot, uint64_t croot);
+int isprivate(int height, uint64_t root, uint64_t key);
 
 
 void __rcache_init(void);
diff -r 067b9aacb6c2 -r b3a255e88810 tools/blktap/parallax/requests-async.c
--- a/tools/blktap/parallax/requests-async.c    Wed Oct 12 09:11:35 2005
+++ b/tools/blktap/parallax/requests-async.c    Wed Oct 12 10:07:37 2005
@@ -27,14 +27,14 @@
 #endif
 
 struct block_info {
-    u32        crc;
-    u32        unused;
+    uint32_t        crc;
+    uint32_t        unused;
 };
 
 struct io_req {
     enum { IO_OP_READ, IO_OP_WRITE } op;
-    u64        root;
-    u64        vaddr;
+    uint64_t        root;
+    uint64_t        vaddr;
     int        state;
     io_cb_t    cb;
     void      *param;
@@ -44,7 +44,7 @@
     struct io_ret     retval;/* holds the return while we unlock. */
     char             *block; /* the block to write */
     radix_tree_node   radix[3];
-    u64               radix_addr[3];
+    uint64_t               radix_addr[3];
     struct block_info bi;
 };
 
@@ -129,7 +129,7 @@
 static void read_cb(struct io_ret ret, void *param);
 static void write_cb(struct io_ret ret, void *param);
 
-int vdi_read(vdi_t *vdi, u64 vaddr, io_cb_t cb, void *param)
+int vdi_read(vdi_t *vdi, uint64_t vaddr, io_cb_t cb, void *param)
 {
     struct io_req *req;
 
@@ -156,7 +156,7 @@
 }
 
 
-int   vdi_write(vdi_t *vdi, u64 vaddr, char *block, 
+int   vdi_write(vdi_t *vdi, uint64_t vaddr, char *block, 
                 io_cb_t cb, void *param)
 {
     struct io_req *req;
@@ -177,8 +177,8 @@
     req->block  = block;
     /* Todo: add a pseodoheader to the block to include some location   */
     /* information in the CRC as well.                                  */
-    req->bi.crc = (u32) crc32(0L, Z_NULL, 0); 
-    req->bi.crc = (u32) crc32(req->bi.crc, block, BLOCK_SIZE); 
+    req->bi.crc = (uint32_t) crc32(0L, Z_NULL, 0); 
+    req->bi.crc = (uint32_t) crc32(req->bi.crc, block, BLOCK_SIZE); 
     req->bi.unused = 0xdeadbeef;
 
     req->cb     = cb;
@@ -196,7 +196,7 @@
 {
     struct io_req *req = (struct io_req *)param;
     radix_tree_node node;
-    u64 idx;
+    uint64_t idx;
     char *block;
     void *req_param;
 
@@ -268,15 +268,15 @@
     }
     case READ_DATA:
     {
-        u32 crc;
+        uint32_t crc;
 
         DPRINTF("READ_DATA\n");
         block = IO_BLOCK(ret);
         if (block == NULL) goto fail;
 
         /* crc check */
-        crc = (u32) crc32(0L, Z_NULL, 0); 
-        crc = (u32) crc32(crc, block, BLOCK_SIZE); 
+        crc = (uint32_t) crc32(0L, Z_NULL, 0); 
+        crc = (uint32_t) crc32(crc, block, BLOCK_SIZE); 
         if (crc != req->bi.crc) {
             /* TODO: add a retry loop here.                          */
             /* Do this after the cache is added -- make sure to      */
@@ -359,7 +359,7 @@
 {
     struct io_req *req = (struct io_req *)param;
     radix_tree_node node;
-    u64 a, addr;
+    uint64_t a, addr;
     void *req_param;
     struct block_info *bi;
 
@@ -721,7 +721,7 @@
     }
 }
 
-char *vdi_read_s(vdi_t *vdi, u64 vaddr)
+char *vdi_read_s(vdi_t *vdi, uint64_t vaddr)
 {
     pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;
     char *block = NULL;
@@ -742,7 +742,7 @@
 }
 
 
-int vdi_write_s(vdi_t *vdi, u64 vaddr, char *block)
+int vdi_write_s(vdi_t *vdi, uint64_t vaddr, char *block)
 {
     pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;
     int ret, result;
diff -r 067b9aacb6c2 -r b3a255e88810 tools/blktap/parallax/requests-async.h
--- a/tools/blktap/parallax/requests-async.h    Wed Oct 12 09:11:35 2005
+++ b/tools/blktap/parallax/requests-async.h    Wed Oct 12 10:07:37 2005
@@ -10,18 +10,18 @@
 #define getid(x) (((x)>>1)&0x7fffffffffffffffLLU)
 #define iswritable(x) (((x) & 1LLU) != 0)
 #define writable(x) (((x) << 1) | 1LLU)
-#define readonly(x) ((u64)((x) << 1))
+#define readonly(x) ((uint64_t)((x) << 1))
 */
 
 #define VADDR_MASK 0x0000000003ffffffLLU /* 26-bits = 256Gig */
 #define VALID_VADDR(x) (((x) & VADDR_MASK) == (x))
 
-int vdi_read (vdi_t *vdi, u64 vaddr, io_cb_t cb, void *param);
-int vdi_write(vdi_t *vdi, u64 vaddr, char *block, io_cb_t cb, void *param);
+int vdi_read (vdi_t *vdi, uint64_t vaddr, io_cb_t cb, void *param);
+int vdi_write(vdi_t *vdi, uint64_t vaddr, char *block, io_cb_t cb, void 
*param);
              
 /* synchronous versions: */
-char *vdi_read_s (vdi_t *vdi, u64 vaddr);
-int   vdi_write_s(vdi_t *vdi, u64 vaddr, char *block);
+char *vdi_read_s (vdi_t *vdi, uint64_t vaddr);
+int   vdi_write_s(vdi_t *vdi, uint64_t vaddr, char *block);
 
 #define ERR_BAD_VADDR  -1
 #define ERR_NOMEM      -2
diff -r 067b9aacb6c2 -r b3a255e88810 tools/blktap/parallax/snaplog.c
--- a/tools/blktap/parallax/snaplog.c   Wed Oct 12 09:11:35 2005
+++ b/tools/blktap/parallax/snaplog.c   Wed Oct 12 10:07:37 2005
@@ -24,7 +24,7 @@
 
 
 
-snap_block_t *snap_get_block(u64 block)
+snap_block_t *snap_get_block(uint64_t block)
 {
     snap_block_t *blk = (snap_block_t *)readblock(block);
     
diff -r 067b9aacb6c2 -r b3a255e88810 tools/blktap/parallax/snaplog.h
--- a/tools/blktap/parallax/snaplog.h   Wed Oct 12 09:11:35 2005
+++ b/tools/blktap/parallax/snaplog.h   Wed Oct 12 10:07:37 2005
@@ -13,12 +13,12 @@
 #define __SNAPLOG_H__
 
 typedef struct snap_id {
-    u64            block;
+    uint64_t            block;
     unsigned int   index;
 } snap_id_t;
 
 typedef struct snap_rec {
-    u64            radix_root;
+    uint64_t            radix_root;
     struct timeval timestamp;
     /* flags: */
     unsigned       deleted:1;
@@ -38,7 +38,7 @@
 static const snap_id_t null_snap_id = { 0, 0 }; 
 
 typedef struct snap_block_hdr {
-    u64            magic;
+    uint64_t            magic;
     snap_id_t      parent_block; /* parent block within this chain */
     snap_id_t      fork_block;   /* where this log was forked */
     unsigned       log_entries;  /* total entries since forking */
@@ -56,6 +56,6 @@
 } snap_block_t;
     
 
-snap_block_t *snap_get_block(u64 block);
+snap_block_t *snap_get_block(uint64_t block);
 
 #endif /* __SNAPLOG_H__ */
diff -r 067b9aacb6c2 -r b3a255e88810 tools/blktap/parallax/vdi.c
--- a/tools/blktap/parallax/vdi.c       Wed Oct 12 09:11:35 2005
+++ b/tools/blktap/parallax/vdi.c       Wed Oct 12 10:07:37 2005
@@ -132,9 +132,9 @@
 /* vdi_get and vdi_put currently act more like alloc/free -- they don't 
  * do refcount-based allocation.  
  */
-vdi_t *vdi_get(u64 vdi_id)
-{
-    u64 vdi_blk;
+vdi_t *vdi_get(uint64_t vdi_id)
+{
+    uint64_t vdi_blk;
     vdi_t *vdi;
     
     vdi_blk = lookup(VDI_REG_HEIGHT, VDI_RADIX_ROOT, vdi_id);
diff -r 067b9aacb6c2 -r b3a255e88810 tools/blktap/parallax/vdi.h
--- a/tools/blktap/parallax/vdi.h       Wed Oct 12 09:11:35 2005
+++ b/tools/blktap/parallax/vdi.h       Wed Oct 12 10:07:37 2005
@@ -21,9 +21,9 @@
 
 
 typedef struct vdi {
-    u64         id;               /* unique vdi id -- used by the registry   */
-    u64         block;            /* block where this vdi lives (also unique)*/
-    u64         radix_root;       /* radix root node for block mappings      */
+    uint64_t         id;               /* unique vdi id -- used by the 
registry   */
+    uint64_t         block;            /* block where this vdi lives (also 
unique)*/
+    uint64_t         radix_root;       /* radix root node for block mappings   
   */
     snap_id_t   snap;             /* next snapshot slot for this VDI         */
     struct vdi *next;             /* used to hash-chain in blkif.            */
     blkif_vdev_t vdevice;         /* currently mounted as...                 */
@@ -34,19 +34,19 @@
 #define VDI_REG_MAGIC   0xff00ff0bb0ff00ffLL
 
 typedef struct vdi_registry {
-    u64     magic;
-    u64     nr_vdis;
+    uint64_t     magic;
+    uint64_t     nr_vdis;
 } vdi_registry_t;
 
 
 int __init_vdi(void);
 
-vdi_t *vdi_get(u64 vdi_id);
+vdi_t *vdi_get(uint64_t vdi_id);
 void vdi_put(vdi_t *vdi);
 vdi_registry_t *get_vdi_registry(void);
 vdi_t *vdi_create(snap_id_t *parent_snap, char *name);
-u64 vdi_lookup_block(vdi_t *vdi, u64 vdi_block, int *writable);
-void vdi_update_block(vdi_t *vdi, u64 vdi_block, u64 g_block);
+uint64_t vdi_lookup_block(vdi_t *vdi, uint64_t vdi_block, int *writable);
+void vdi_update_block(vdi_t *vdi, uint64_t vdi_block, uint64_t g_block);
 void vdi_snapshot(vdi_t *vdi);
 
 
diff -r 067b9aacb6c2 -r b3a255e88810 tools/blktap/parallax/vdi_create.c
--- a/tools/blktap/parallax/vdi_create.c        Wed Oct 12 09:11:35 2005
+++ b/tools/blktap/parallax/vdi_create.c        Wed Oct 12 10:07:37 2005
@@ -33,7 +33,7 @@
     name[VDI_NAME_SZ] = '\0';    
     
     if ( argc > 3 ) {
-        id.block   = (u64)          atoll(argv[2]);
+        id.block   = (uint64_t)          atoll(argv[2]);
         id.index   = (unsigned int) atol (argv[3]);
         from_snap  = 1;
     }
diff -r 067b9aacb6c2 -r b3a255e88810 tools/blktap/parallax/vdi_fill.c
--- a/tools/blktap/parallax/vdi_fill.c  Wed Oct 12 09:11:35 2005
+++ b/tools/blktap/parallax/vdi_fill.c  Wed Oct 12 10:07:37 2005
@@ -22,13 +22,13 @@
 int main(int argc, char *argv[])
 {
     vdi_t       *vdi;
-    u64          id;
+    uint64_t          id;
     int          fd;
     struct stat  st;
-    u64          tot_size;
+    uint64_t          tot_size;
     char         spage[BLOCK_SIZE];
     char        *dpage;
-    u64          vblock = 0, count=0;
+    uint64_t          vblock = 0, count=0;
     
     __init_blockstore();
     init_block_async();
@@ -39,7 +39,7 @@
         exit(-1);
     }
         
-    id = (u64) atoll(argv[1]);
+    id = (uint64_t) atoll(argv[1]);
     
     vdi = vdi_get( id );
     
@@ -60,7 +60,7 @@
         exit(-1);
     }
     
-    tot_size = (u64) st.st_size;
+    tot_size = (uint64_t) st.st_size;
     printf("Filling VDI %Ld with %Ld bytes.\n", id, tot_size);
     
     printf("%011Ld blocks total\n", tot_size / BLOCK_SIZE);    
diff -r 067b9aacb6c2 -r b3a255e88810 tools/blktap/parallax/vdi_snap.c
--- a/tools/blktap/parallax/vdi_snap.c  Wed Oct 12 09:11:35 2005
+++ b/tools/blktap/parallax/vdi_snap.c  Wed Oct 12 10:07:37 2005
@@ -17,7 +17,7 @@
 int main(int argc, char *argv[])
 {
     vdi_t  *vdi;
-    u64     id;
+    uint64_t     id;
     
     __init_blockstore();
     __init_vdi();
@@ -27,7 +27,7 @@
         exit(-1);
     }
     
-    id = (u64) atoll(argv[1]);
+    id = (uint64_t) atoll(argv[1]);
     
     vdi = vdi_get(id);
     
diff -r 067b9aacb6c2 -r b3a255e88810 tools/blktap/parallax/vdi_snap_delete.c
--- a/tools/blktap/parallax/vdi_snap_delete.c   Wed Oct 12 09:11:35 2005
+++ b/tools/blktap/parallax/vdi_snap_delete.c   Wed Oct 12 10:07:37 2005
@@ -34,7 +34,7 @@
         exit(-1);
     }
     
-    id.block   = (u64)          atoll(argv[1]);
+    id.block   = (uint64_t)          atoll(argv[1]);
     id.index   = (unsigned int) atol (argv[2]);
     
     c_id = id;
diff -r 067b9aacb6c2 -r b3a255e88810 tools/blktap/parallax/vdi_snap_list.c
--- a/tools/blktap/parallax/vdi_snap_list.c     Wed Oct 12 09:11:35 2005
+++ b/tools/blktap/parallax/vdi_snap_list.c     Wed Oct 12 10:07:37 2005
@@ -18,7 +18,7 @@
 int main(int argc, char *argv[])
 {
     vdi_t        *vdi;
-    u64           id;
+    uint64_t           id;
     int           i, max_snaps = -1;
     snap_block_t *blk;
     snap_id_t     sid;
@@ -32,7 +32,7 @@
         exit(-1);
     }
     
-    id = (u64) atoll(argv[1]);
+    id = (uint64_t) atoll(argv[1]);
     
     if ( argc > 2 ) {
         max_snaps = atoi(argv[2]);
diff -r 067b9aacb6c2 -r b3a255e88810 tools/blktap/parallax/vdi_unittest.c
--- a/tools/blktap/parallax/vdi_unittest.c      Wed Oct 12 09:11:35 2005
+++ b/tools/blktap/parallax/vdi_unittest.c      Wed Oct 12 10:07:37 2005
@@ -39,9 +39,9 @@
     zero_page = newblock();
 }
 
-inline u64 make_vaddr(u64 L1, u64 L2, u64 L3)
+inline uint64_t make_vaddr(uint64_t L1, uint64_t L2, uint64_t L3)
 {
-    u64 ret = L1;
+    uint64_t ret = L1;
 
     ret = (ret << 9) | L2;
     ret = (ret << 9) | L3;
@@ -49,9 +49,9 @@
     return ret;
 }
 
-void touch_block(vdi_t *vdi, u64 L1, u64 L2, u64 L3)
+void touch_block(vdi_t *vdi, uint64_t L1, uint64_t L2, uint64_t L3)
 {
-    u64 vaddr;
+    uint64_t vaddr;
     char *page = pages[next_page++];
     char *rpage = NULL;
 
@@ -76,9 +76,9 @@
     freeblock(rpage);
 }
 
-void test_block(vdi_t *vdi, u64 L1, u64 L2, u64 L3, char *page)
+void test_block(vdi_t *vdi, uint64_t L1, uint64_t L2, uint64_t L3, char *page)
 {
-    u64 vaddr;
+    uint64_t vaddr;
     char *rpage = NULL;
 
     printf("TEST  (%3Lu, %3Lu, %3Lu)\n", L1, L2, L3);
@@ -103,7 +103,7 @@
 
 void coverage_test(vdi_t *vdi)
 {
-    u64 vaddr;
+    uint64_t vaddr;
     int i, j, k;
 
     /* Do a series of writes and reads to test all paths through the 
@@ -155,13 +155,13 @@
 int main(int argc, char *argv[])
 {
     vdi_t       *vdi;
-    u64          id;
+    uint64_t          id;
     int          fd;
     struct stat  st;
-    u64          tot_size;
+    uint64_t          tot_size;
     char         spage[BLOCK_SIZE];
     char        *dpage;
-    u64          vblock = 0, count=0;
+    uint64_t          vblock = 0, count=0;
     
     __init_blockstore();
     init_block_async();
diff -r 067b9aacb6c2 -r b3a255e88810 tools/blktap/parallax/vdi_validate.c
--- a/tools/blktap/parallax/vdi_validate.c      Wed Oct 12 09:11:35 2005
+++ b/tools/blktap/parallax/vdi_validate.c      Wed Oct 12 10:07:37 2005
@@ -23,13 +23,13 @@
 int main(int argc, char *argv[])
 {
     vdi_t       *vdi;
-    u64          id;
+    uint64_t          id;
     int          fd;
     struct stat  st;
-    u64          tot_size;
+    uint64_t          tot_size;
     char         spage[BLOCK_SIZE], *dpage;
     char        *vpage;
-    u64          vblock = 0, count=0;
+    uint64_t          vblock = 0, count=0;
     
     __init_blockstore();
     init_block_async();
@@ -40,7 +40,7 @@
         exit(-1);
     }
         
-    id = (u64) atoll(argv[1]);
+    id = (uint64_t) atoll(argv[1]);
     
     vdi = vdi_get( id );
     
@@ -61,7 +61,7 @@
         exit(-1);
     }
     
-    tot_size = (u64) st.st_size;
+    tot_size = (uint64_t) st.st_size;
     printf("Testing VDI %Ld (%Ld bytes).\n", id, tot_size);
     
     printf("           ");
diff -r 067b9aacb6c2 -r b3a255e88810 tools/blktap/ublkback/ublkbacklib.c
--- a/tools/blktap/ublkback/ublkbacklib.c       Wed Oct 12 09:11:35 2005
+++ b/tools/blktap/ublkback/ublkbacklib.c       Wed Oct 12 10:07:37 2005
@@ -112,7 +112,7 @@
 typedef struct image {
     /* These need to turn into an array/rbtree for multi-disk support. */
     int  fd;
-    u64  fsid;
+    uint64_t  fsid;
     blkif_vdev_t   vdevice;
     long int size;
     long int secsize;
@@ -190,7 +190,7 @@
   }
 */
     if (image->size == 0)
-        image->size =((u64) 16836057);
+        image->size =((uint64_t) 16836057);
     image->secsize = 512;
     image->info = 0;
 
@@ -215,7 +215,7 @@
 int ublkback_request(blkif_t *blkif, blkif_request_t *req, int batch_done)
 {
     int fd;
-    u64 sector;
+    uint64_t sector;
     char *spage, *dpage;
     int ret, i, idx;
     blkif_response_t *rsp;
diff -r 067b9aacb6c2 -r b3a255e88810 tools/console/daemon/io.c
--- a/tools/console/daemon/io.c Wed Oct 12 09:11:35 2005
+++ b/tools/console/daemon/io.c Wed Oct 12 10:07:37 2005
@@ -474,7 +474,7 @@
 
 static void handle_ring_read(struct domain *dom)
 {
-       u16 v;
+       uint16_t v;
 
        if (!read_sync(dom->evtchn_fd, &v, sizeof(v)))
                return;
diff -r 067b9aacb6c2 -r b3a255e88810 
tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/linux-xen-low.c
--- a/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/linux-xen-low.c     
Wed Oct 12 09:11:35 2005
+++ b/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/linux-xen-low.c     
Wed Oct 12 10:07:37 2005
@@ -38,7 +38,7 @@
 #include <xenctrl.h>
 #define TRACE_ENTER /* printf("enter %s\n", __FUNCTION__) */
 
-long (*myptrace)(int xc_handle, enum __ptrace_request, u32, long, long);
+long (*myptrace)(int xc_handle, enum __ptrace_request, uint32_t, long, long);
 int (*myxcwait)(int xc_handle, int domain, int *status, int options) ;
 static int xc_handle;
 
diff -r 067b9aacb6c2 -r b3a255e88810 tools/debugger/libxendebug/xendebug.c
--- a/tools/debugger/libxendebug/xendebug.c     Wed Oct 12 09:11:35 2005
+++ b/tools/debugger/libxendebug/xendebug.c     Wed Oct 12 10:07:37 2005
@@ -41,8 +41,8 @@
 {
     struct list_head list;
     unsigned long address;
-    u32 domain;
-    u8 old_value;                             /* old value for software bkpt */
+    uint32_t domain;
+    uint8_t old_value;                             /* old value for software 
bkpt */
 } bwcpoint_t, *bwcpoint_p;
 
 static bwcpoint_t bwcpoint_list;
@@ -52,7 +52,7 @@
 typedef struct domain_context                 /* local cache of domain state */
 {
     struct list_head     list;
-    u32                  domid;
+    uint32_t                  domid;
     boolean              valid[MAX_VIRT_CPUS];
     vcpu_guest_context_t context[MAX_VIRT_CPUS];
 
@@ -92,7 +92,7 @@
 /**************/
 
 static domain_context_p
-xendebug_domain_context_search (u32 domid)
+xendebug_domain_context_search (uint32_t domid)
 {
     struct list_head *entry;
     domain_context_p  ctxt;
@@ -107,7 +107,7 @@
 }
 
 static __inline__ domain_context_p
-xendebug_get_context (int xc_handle, u32 domid, u32 vcpu)
+xendebug_get_context (int xc_handle, uint32_t domid, uint32_t vcpu)
 {
     int rc;
     domain_context_p ctxt;
@@ -130,7 +130,7 @@
 }
 
 static __inline__ int
-xendebug_set_context (int xc_handle, domain_context_p ctxt, u32 vcpu)
+xendebug_set_context (int xc_handle, domain_context_p ctxt, uint32_t vcpu)
 {
     dom0_op_t op;
     int rc;
@@ -157,8 +157,8 @@
 
 int
 xendebug_attach(int xc_handle,
-                u32 domid,
-                u32 vcpu)
+                uint32_t domid,
+                uint32_t vcpu)
 {
     domain_context_p ctxt;
 
@@ -176,8 +176,8 @@
 
 int
 xendebug_detach(int xc_handle,
-                u32 domid,
-                u32 vcpu)
+                uint32_t domid,
+                uint32_t vcpu)
 {
     domain_context_p ctxt;
     
@@ -197,8 +197,8 @@
 
 int
 xendebug_read_registers(int xc_handle,
-                        u32 domid,
-                        u32 vcpu,
+                        uint32_t domid,
+                        uint32_t vcpu,
                         cpu_user_regs_t **regs)
 {
     domain_context_p ctxt;
@@ -218,8 +218,8 @@
 
 int
 xendebug_read_fpregisters (int xc_handle,
-                           u32 domid,
-                           u32 vcpu,
+                           uint32_t domid,
+                           uint32_t vcpu,
                            char **regs)
 {
     domain_context_p ctxt;
@@ -239,8 +239,8 @@
 
 int
 xendebug_write_registers(int xc_handle,
-                         u32 domid,
-                         u32 vcpu,
+                         uint32_t domid,
+                         uint32_t vcpu,
                          cpu_user_regs_t *regs)
 {
     domain_context_p ctxt;
@@ -260,8 +260,8 @@
 
 int
 xendebug_step(int xc_handle,
-              u32 domid,
-              u32 vcpu)
+              uint32_t domid,
+              uint32_t vcpu)
 {
     domain_context_p ctxt;
     int rc;
@@ -282,8 +282,8 @@
 
 int
 xendebug_continue(int xc_handle,
-                  u32 domid,
-                  u32 vcpu)
+                  uint32_t domid,
+                  uint32_t vcpu)
 {
     domain_context_p ctxt;
     int rc;
@@ -310,8 +310,8 @@
 
 /* access to one page */
 static int
-xendebug_memory_page (domain_context_p ctxt, int xc_handle, u32 vcpu,
-                      int protection, unsigned long address, int length, u8 
*buffer)
+xendebug_memory_page (domain_context_p ctxt, int xc_handle, uint32_t vcpu,
+                      int protection, unsigned long address, int length, 
uint8_t *buffer)
 {
     vcpu_guest_context_t *vcpu_ctxt = &ctxt->context[vcpu];
     unsigned long pde, page;
@@ -406,8 +406,8 @@
 
 /* divide a memory operation into accesses to individual pages */
 static int
-xendebug_memory_op (domain_context_p ctxt, int xc_handle, u32 vcpu,
-                    int protection, unsigned long address, int length, u8 
*buffer)
+xendebug_memory_op (domain_context_p ctxt, int xc_handle, uint32_t vcpu,
+                    int protection, unsigned long address, int length, uint8_t 
*buffer)
 {
     int      remain;              /* number of bytes to touch past this page */
     int      bytes   = 0;
@@ -429,11 +429,11 @@
 
 int
 xendebug_read_memory(int xc_handle,
-                     u32 domid,
-                     u32 vcpu,
+                     uint32_t domid,
+                     uint32_t vcpu,
                      unsigned long address,
-                     u32 length,
-                     u8 *data)
+                     uint32_t length,
+                     uint8_t *data)
 {
     domain_context_p ctxt;
 
@@ -449,11 +449,11 @@
 
 int
 xendebug_write_memory(int xc_handle,
-                      u32 domid,
-                      u32 vcpu,
+                      uint32_t domid,
+                      uint32_t vcpu,
                       unsigned long address,
-                      u32 length,
-                      u8 *data)
+                      uint32_t length,
+                      uint8_t *data)
 {
     domain_context_p ctxt;
 
@@ -469,13 +469,13 @@
 
 int
 xendebug_insert_memory_breakpoint(int xc_handle,
-                                  u32 domid,
-                                  u32 vcpu,
+                                  uint32_t domid,
+                                  uint32_t vcpu,
                                   unsigned long address,
-                                  u32 length)
+                                  uint32_t length)
 {
     bwcpoint_p bkpt;
-    u8 breakpoint_opcode = 0xcc;
+    uint8_t breakpoint_opcode = 0xcc;
 
     printf("insert breakpoint %d:%lx %d\n",
             domid, address, length);
@@ -515,10 +515,10 @@
 
 int
 xendebug_remove_memory_breakpoint(int xc_handle,
-                                  u32 domid,
-                                  u32 vcpu,
+                                  uint32_t domid,
+                                  uint32_t vcpu,
                                   unsigned long address,
-                                  u32 length)
+                                  uint32_t length)
 {
     bwcpoint_p bkpt = NULL;
 
@@ -552,7 +552,7 @@
 xendebug_query_domain_stop(int xc_handle, int *dom_list, int dom_list_size)
 {
     xc_dominfo_t *info;
-    u32 first_dom = 0;
+    uint32_t first_dom = 0;
     int max_doms = 1024;
     int nr_doms, loop;
     int count = 0;
diff -r 067b9aacb6c2 -r b3a255e88810 tools/debugger/libxendebug/xendebug.h
--- a/tools/debugger/libxendebug/xendebug.h     Wed Oct 12 09:11:35 2005
+++ b/tools/debugger/libxendebug/xendebug.h     Wed Oct 12 10:07:37 2005
@@ -12,63 +12,63 @@
 #include <xenctrl.h>
 
 int xendebug_attach(int xc_handle,
-                   u32 domid,
-                   u32 vcpu);
+                   uint32_t domid,
+                   uint32_t vcpu);
 
 int xendebug_detach(int xc_handle,
-                   u32 domid,
-                   u32 vcpu);
+                   uint32_t domid,
+                   uint32_t vcpu);
 
 int xendebug_read_registers(int xc_handle,
-                           u32 domid,
-                           u32 vcpu,
+                           uint32_t domid,
+                           uint32_t vcpu,
                            cpu_user_regs_t **regs);
 
 int xendebug_read_fpregisters (int xc_handle,
-                              u32 domid,
-                              u32 vcpu,
+                              uint32_t domid,
+                              uint32_t vcpu,
                               char **regs);
 
 int xendebug_write_registers(int xc_handle,
-                            u32 domid,
-                            u32 vcpu,
+                            uint32_t domid,
+                            uint32_t vcpu,
                             cpu_user_regs_t *regs);
 
 int xendebug_step(int xc_handle,
-                 u32 domid,
-                 u32 vcpu);
+                 uint32_t domid,
+                 uint32_t vcpu);
 
 int xendebug_continue(int xc_handle,
-                     u32 domid,
-                     u32 vcpu);
+                     uint32_t domid,
+                     uint32_t vcpu);
 
 int xendebug_read_memory(int xc_handle,
-                        u32 domid,
-                        u32 vcpu,
+                        uint32_t domid,
+                        uint32_t vcpu,
                         unsigned long address,
-                        u32 length,
-                        u8 *data);
+                        uint32_t length,
+                        uint8_t *data);
 
 
 int xendebug_write_memory(int xc_handle,
-                         u32 domid,
-                         u32 vcpu,
+                         uint32_t domid,
+                         uint32_t vcpu,
                          unsigned long address,
-                         u32 length,
-                         u8 *data);
+                         uint32_t length,
+                         uint8_t *data);
 
 
 int xendebug_insert_memory_breakpoint(int xc_handle,
-                                     u32 domid,
-                                     u32 vcpu,
+                                     uint32_t domid,
+                                     uint32_t vcpu,
                                      unsigned long address,
-                                     u32 length);
+                                     uint32_t length);
 
 int xendebug_remove_memory_breakpoint(int xc_handle,
-                                     u32 domid,
-                                     u32 vcpu,
+                                     uint32_t domid,
+                                     uint32_t vcpu,
                                      unsigned long address,
-                                     u32 length);
+                                     uint32_t length);
 
 int xendebug_query_domain_stop(int xc_handle,
                               int *dom_list, 
diff -r 067b9aacb6c2 -r b3a255e88810 tools/debugger/pdb/linux-2.6-module/debug.c
--- a/tools/debugger/pdb/linux-2.6-module/debug.c       Wed Oct 12 09:11:35 2005
+++ b/tools/debugger/pdb/linux-2.6-module/debug.c       Wed Oct 12 10:07:37 2005
@@ -29,13 +29,13 @@
     unsigned long address;
     int length;
 
-    u8  type;                                                     /* BWC_??? */
-    u8  mode;                   /* for BWC_PAGE, the current protection mode */
-    u32 process;
-    u8  error;                /* error occured when enabling: don't disable. */
+    uint8_t  type;                                                     /* 
BWC_??? */
+    uint8_t  mode;                   /* for BWC_PAGE, the current protection 
mode */
+    uint32_t process;
+    uint8_t  error;                /* error occured when enabling: don't 
disable. */
 
     /* original values */
-    u8    orig_bkpt;                               /* single byte breakpoint */
+    uint8_t    orig_bkpt;                               /* single byte 
breakpoint */
     pte_t orig_pte;
 
     struct list_head watchpt_read_list;     /* read watchpoints on this page */
@@ -109,7 +109,7 @@
 }
 
 bwcpoint_p
-pdb_search_watchpoint (u32 process, unsigned long address)
+pdb_search_watchpoint (uint32_t process, unsigned long address)
 {
     bwcpoint_p bwc_watch = (bwcpoint_p) 0;
     bwcpoint_p bwc_entry = (bwcpoint_p) 0;
@@ -150,7 +150,7 @@
 int
 pdb_suspend (struct task_struct *target)
 {
-    u32 rc = 0;
+    uint32_t rc = 0;
 
     force_sig(SIGSTOP, target);                    /* force_sig_specific ??? */
 
@@ -364,11 +364,11 @@
 
 int
 pdb_insert_memory_breakpoint (struct task_struct *target, 
-                              unsigned long address, u32 length)
+                              unsigned long address, uint32_t length)
 {
     int rc = 0;
     bwcpoint_p bkpt;
-    u8 breakpoint_opcode = 0xcc;
+    uint8_t breakpoint_opcode = 0xcc;
 
     printk("insert breakpoint %d:%lx len: %d\n", target->pid, address, length);
 
@@ -399,7 +399,7 @@
 
 int
 pdb_remove_memory_breakpoint (struct task_struct *target,
-                              unsigned long address, u32 length)
+                              unsigned long address, uint32_t length)
 {
     int rc = 0;
     bwcpoint_p bkpt = NULL;
diff -r 067b9aacb6c2 -r b3a255e88810 
tools/debugger/pdb/linux-2.6-module/pdb_debug.h
--- a/tools/debugger/pdb/linux-2.6-module/pdb_debug.h   Wed Oct 12 09:11:35 2005
+++ b/tools/debugger/pdb/linux-2.6-module/pdb_debug.h   Wed Oct 12 10:07:37 2005
@@ -18,9 +18,9 @@
 int pdb_step (struct task_struct *target);
 
 int pdb_insert_memory_breakpoint (struct task_struct *target, 
-                                  unsigned long address, u32 length);
+                                  unsigned long address, uint32_t length);
 int pdb_remove_memory_breakpoint (struct task_struct *target,
-                                  unsigned long address, u32 length);
+                                  unsigned long address, uint32_t length);
 int pdb_insert_watchpoint (struct task_struct *target,
                            pdb_op_watchpt_p watchpt);
 int pdb_remove_watchpoint (struct task_struct *target,
diff -r 067b9aacb6c2 -r b3a255e88810 
tools/debugger/pdb/linux-2.6-module/pdb_module.h
--- a/tools/debugger/pdb/linux-2.6-module/pdb_module.h  Wed Oct 12 09:11:35 2005
+++ b/tools/debugger/pdb/linux-2.6-module/pdb_module.h  Wed Oct 12 10:07:37 2005
@@ -9,7 +9,7 @@
 #define PDB_OPCODE_ATTACH 2
 typedef struct pdb_op_attach
 {
-    u32  domain;
+    uint32_t  domain;
 } pdb_op_attach_t, *pdb_op_attach_p;
 
 #define PDB_OPCODE_DETACH 3
@@ -17,43 +17,43 @@
 #define PDB_OPCODE_RD_REG 4
 typedef struct pdb_op_rd_reg
 {
-    u32 reg;
-    u32 value;
+    uint32_t reg;
+    uint32_t value;
 } pdb_op_rd_reg_t, *pdb_op_rd_reg_p;
 
 #define PDB_OPCODE_RD_REGS 5
 typedef struct pdb_op_rd_regs
 {
-    u32 reg[GDB_REGISTER_FRAME_SIZE];
+    uint32_t reg[GDB_REGISTER_FRAME_SIZE];
 } pdb_op_rd_regs_t, *pdb_op_rd_regs_p;
 
 #define PDB_OPCODE_WR_REG 6
 typedef struct pdb_op_wr_reg
 {
-    u32 reg;
-    u32 value;
+    uint32_t reg;
+    uint32_t value;
 } pdb_op_wr_reg_t, *pdb_op_wr_reg_p;
 
 #define PDB_OPCODE_RD_MEM 7
 typedef struct pdb_op_rd_mem_req
 {
-    u32 address;
-    u32 length;
+    uint32_t address;
+    uint32_t length;
 } pdb_op_rd_mem_req_t, *pdb_op_rd_mem_req_p;
 
 typedef struct pdb_op_rd_mem_resp
 {
-    u32 address;
-    u32 length;
-    u8  data[1024];
+    uint32_t address;
+    uint32_t length;
+    uint8_t  data[1024];
 } pdb_op_rd_mem_resp_t, *pdb_op_rd_mem_resp_p;
 
 #define PDB_OPCODE_WR_MEM 8
 typedef struct pdb_op_wr_mem
 {
-    u32 address;
-    u32 length;
-    u8  data[1024];                                             /* arbitrary */
+    uint32_t address;
+    uint32_t length;
+    uint8_t  data[1024];                                             /* 
arbitrary */
 } pdb_op_wr_mem_t, *pdb_op_wr_mem_p;
 
 #define PDB_OPCODE_CONTINUE 9
@@ -63,8 +63,8 @@
 #define PDB_OPCODE_CLR_BKPT 12
 typedef struct pdb_op_bkpt
 {
-    u32 address;
-    u32 length;
+    uint32_t address;
+    uint32_t length;
 } pdb_op_bkpt_t, *pdb_op_bkpt_p;
 
 #define PDB_OPCODE_SET_WATCHPT 13
@@ -79,16 +79,16 @@
 #define BWC_WATCH_WRITE  102
 #define BWC_WATCH_READ   103
 #define BWC_WATCH_ACCESS 104
-    u32 type;
-    u32 address;
-    u32 length;
+    uint32_t type;
+    uint32_t address;
+    uint32_t length;
 } pdb_op_watchpt_t, *pdb_op_watchpt_p;
 
 
 typedef struct 
 {
-    u8   operation;       /* PDB_OPCODE_???      */
-    u32  process;
+    uint8_t   operation;       /* PDB_OPCODE_???      */
+    uint32_t  process;
     union
     {
         pdb_op_attach_t     attach;
@@ -107,10 +107,10 @@
 #define PDB_RESPONSE_ERROR -1
 
 typedef struct {
-    u8   operation;       /* copied from request */
-    u32  domain;          
-    u32  process;
-    s16  status;          /* PDB_RESPONSE_???    */
+    uint8_t  operation;       /* copied from request */
+    uint32_t domain;          
+    uint32_t process;
+    int16_t  status;          /* PDB_RESPONSE_???    */
     union
     {
         pdb_op_rd_reg_t      rd_reg;
diff -r 067b9aacb6c2 -r b3a255e88810 tools/debugger/pdb/pdb_caml_domain.c
--- a/tools/debugger/pdb/pdb_caml_domain.c      Wed Oct 12 09:11:35 2005
+++ b/tools/debugger/pdb/pdb_caml_domain.c      Wed Oct 12 10:07:37 2005
@@ -204,7 +204,7 @@
     int loop;
     char *buffer;
     unsigned long my_address = Int32_val(address);
-    u32 my_length = Int_val(length);
+    uint32_t my_length = Int_val(length);
 
     printf ("(pdb) read memory\n");
 
@@ -260,7 +260,7 @@
 
     char buffer[4096];  /* a big buffer */
     unsigned long  my_address;
-    u32 length = 0;
+    uint32_t length = 0;
 
     printf ("(pdb) write memory\n");
 
diff -r 067b9aacb6c2 -r b3a255e88810 tools/debugger/pdb/pdb_caml_evtchn.c
--- a/tools/debugger/pdb/pdb_caml_evtchn.c      Wed Oct 12 09:11:35 2005
+++ b/tools/debugger/pdb/pdb_caml_evtchn.c      Wed Oct 12 10:07:37 2005
@@ -125,7 +125,7 @@
 {
     CAMLparam1(fd);
 
-    u16 v;
+    uint16_t v;
     int bytes;
     int rc = -1;
     int myfd = Int_val(fd);
@@ -168,7 +168,7 @@
     CAMLparam1(fd);
 
     int myfd = Int_val(fd);
-    u16 myidx = Int_val(idx);
+    uint16_t myidx = Int_val(idx);
 
     (void)write(myfd, &myidx, sizeof(myidx));
 
diff -r 067b9aacb6c2 -r b3a255e88810 tools/debugger/pdb/pdb_caml_process.c
--- a/tools/debugger/pdb/pdb_caml_process.c     Wed Oct 12 09:11:35 2005
+++ b/tools/debugger/pdb/pdb_caml_process.c     Wed Oct 12 10:07:37 2005
@@ -404,7 +404,7 @@
 
     context_t ctx;
     pdb_request_t req;
-    u32 length = 0;
+    uint32_t length = 0;
 
     decode_context(&ctx, context);
 
diff -r 067b9aacb6c2 -r b3a255e88810 tools/debugger/pdb/pdb_caml_xc.c
--- a/tools/debugger/pdb/pdb_caml_xc.c  Wed Oct 12 09:11:35 2005
+++ b/tools/debugger/pdb/pdb_caml_xc.c  Wed Oct 12 10:07:37 2005
@@ -151,7 +151,7 @@
 }
 
 void *
-map_ring(u32 dom, unsigned long mfn )
+map_ring(uint32_t dom, unsigned long mfn )
 {
     return xc_map_foreign_range(xc_handle, dom, PAGE_SIZE,
                                 PROT_READ | PROT_WRITE, mfn);
diff -r 067b9aacb6c2 -r b3a255e88810 tools/debugger/pdb/pdb_caml_xcs.c
--- a/tools/debugger/pdb/pdb_caml_xcs.c Wed Oct 12 09:11:35 2005
+++ b/tools/debugger/pdb/pdb_caml_xcs.c Wed Oct 12 10:07:37 2005
@@ -36,7 +36,7 @@
 #include "pdb_module.h"
 #include "pdb_caml_xen.h"
 
-void *map_ring(u32 dom, unsigned long mfn );
+void *map_ring(uint32_t dom, unsigned long mfn );
 
 /*
  * xcs_initialize_ring : int -> int32 -> int32
@@ -180,7 +180,7 @@
     char *my_path = String_val(path);
     int my_msg_type = Int_val(msg_type);
     struct sockaddr_un addr;
-    u32 session_id = 0;
+    uint32_t session_id = 0;
     int data_fd;
     int ret, len;
     xcs_msg_t msg;
diff -r 067b9aacb6c2 -r b3a255e88810 tools/firmware/acpi/acpi2_0.h
--- a/tools/firmware/acpi/acpi2_0.h     Wed Oct 12 09:11:35 2005
+++ b/tools/firmware/acpi/acpi2_0.h     Wed Oct 12 10:07:37 2005
@@ -18,7 +18,21 @@
 #ifndef _ACPI_2_0_H_
 #define _ACPI_2_0_H_
 
-#include "xenctrl.h"  // for u8, u16, u32, u64 definition
+typedef unsigned char  uint8_t;
+typedef   signed char  int8_t;
+typedef unsigned short uint16_t;
+typedef   signed short int16_t;
+typedef unsigned int   uint32_t;
+typedef   signed int   int32_t;
+#ifdef __i386__
+typedef unsigned long long uint64_t;
+typedef   signed long long int64_t;
+#else
+typedef unsigned long uint64_t;
+typedef   signed long int64_t;
+#endif
+
+#include <xen/xen.h>
 
 #pragma pack (1)
 
@@ -27,15 +41,15 @@
 //
 
 typedef struct {
-               u32                     Signature;
-               u32             Length;
-               u8                      Revision;
-               u8                      Checksum;
-               u8                      OemId[6];
-               u64                     OemTableId;
-               u32                     OemRevision;
-               u32                     CreatorId;
-               u32                     CreatorRevision;
+               uint32_t                        Signature;
+               uint32_t        Length;
+               uint8_t                 Revision;
+               uint8_t                 Checksum;
+               uint8_t                 OemId[6];
+               uint64_t                        OemTableId;
+               uint32_t                        OemRevision;
+               uint32_t                        CreatorId;
+               uint32_t                        CreatorRevision;
 } ACPI_TABLE_HEADER;
 
 
@@ -49,11 +63,11 @@
 // ACPI 2.0 Generic Address Space definition
 //
 typedef struct {
-               u8                            AddressSpaceId;
-               u8                            RegisterBitWidth;
-               u8                            RegisterBitOffset;
-               u8                            Reserved;
-               u64                           Address;
+               uint8_t                            AddressSpaceId;
+               uint8_t                            RegisterBitWidth;
+               uint8_t                            RegisterBitOffset;
+               uint8_t                            Reserved;
+               uint64_t                           Address;
 } ACPI_GENERIC_ADDRESS_STRUCTURE;
 
 //
@@ -70,11 +84,11 @@
 // Root System Description Pointer Structure in ACPI 1.0
 //
 typedef struct {
-               u64                           Signature;
-               u8                            Checksum;
-               u8                            OemId[6];
-               u8                            Reserved;
-               u32                           RsdtAddress;
+               uint64_t                           Signature;
+               uint8_t                            Checksum;
+               uint8_t                            OemId[6];
+               uint8_t                            Reserved;
+               uint32_t                           RsdtAddress;
 } ACPI_1_0_RSDP;
 
 
@@ -82,15 +96,15 @@
 // Root System Description Pointer Structure
 //
 typedef struct {
-               u64                           Signature;
-               u8                            Checksum;
-               u8                            OemId[6];
-               u8                            Revision;
-               u32                           RsdtAddress;
-               u32                           Length;
-               u64                           XsdtAddress;
-               u8                            ExtendedChecksum;
-               u8                            Reserved[3];
+               uint64_t                           Signature;
+               uint8_t                            Checksum;
+               uint8_t                            OemId[6];
+               uint8_t                            Revision;
+               uint32_t                           RsdtAddress;
+               uint32_t                           Length;
+               uint64_t                           XsdtAddress;
+               uint8_t                            ExtendedChecksum;
+               uint8_t                            Reserved[3];
 } ACPI_2_0_RSDP;
 
 
@@ -105,7 +119,7 @@
 
 typedef struct {
                ACPI_TABLE_HEADER Header;
-               u32 Entry[ACPI_MAX_NUM_TABLES];
+               uint32_t Entry[ACPI_MAX_NUM_TABLES];
 }ACPI_2_0_RSDT;
 
 //
@@ -120,7 +134,7 @@
 
 typedef struct _ACPI_2_0_XSDT{
                ACPI_TABLE_HEADER Header;
-               u64 Entry[ACPI_MAX_NUM_TABLES];
+               uint64_t Entry[ACPI_MAX_NUM_TABLES];
 }ACPI_2_0_XSDT;
 #define ACPI_2_0_XSDT_REVISION 0x01
 
@@ -130,49 +144,49 @@
 
 typedef struct  {
                ACPI_TABLE_HEADER               Header;
-               u32                                    FirmwareCtrl;
-               u32                                    Dsdt;
-               u8                                     Reserved0;
-               u8                                     PreferredPmProfile;
-               u16                                    SciInt;
-               u32                                    SmiCmd;
-               u8                                     AcpiEnable;
-               u8                                     AcpiDisable;
-               u8                                     S4BiosReq;
-               u8                                     PstateCnt;
-               u32                                    Pm1aEvtBlk;
-               u32                                    Pm1bEvtBlk;
-               u32                                    Pm1aCntBlk;
-               u32                                    Pm1bCntBlk;
-               u32                                    Pm2CntBlk;
-               u32                                    PmTmrBlk;
-               u32                                    Gpe0Blk;
-               u32                                    Gpe1Blk;
-               u8                                     Pm1EvtLen;
-               u8                                     Pm1CntLen;
-               u8                                     Pm2CntLen;
-               u8                                     PmTmrLen;
-               u8                                     Gpe0BlkLen;
-               u8                                     Gpe1BlkLen;
-               u8                                     Gpe1Base;
-               u8                                     CstCnt;
-               u16                                    PLvl2Lat;
-               u16                                    PLvl3Lat;
-               u16                                    FlushSize;
-               u16                                    FlushStride;
-               u8                                     DutyOffset;
-               u8                                     DutyWidth;
-               u8                                     DayAlrm;
-               u8                                     MonAlrm;
-               u8                                     Century;
-               u16                                    IaPcBootArch;
-               u8                                     Reserved1;
-               u32                                    Flags;
+               uint32_t                                    FirmwareCtrl;
+               uint32_t                                    Dsdt;
+               uint8_t                                     Reserved0;
+               uint8_t                                     PreferredPmProfile;
+               uint16_t                                    SciInt;
+               uint32_t                                    SmiCmd;
+               uint8_t                                     AcpiEnable;
+               uint8_t                                     AcpiDisable;
+               uint8_t                                     S4BiosReq;
+               uint8_t                                     PstateCnt;
+               uint32_t                                    Pm1aEvtBlk;
+               uint32_t                                    Pm1bEvtBlk;
+               uint32_t                                    Pm1aCntBlk;
+               uint32_t                                    Pm1bCntBlk;
+               uint32_t                                    Pm2CntBlk;
+               uint32_t                                    PmTmrBlk;
+               uint32_t                                    Gpe0Blk;
+               uint32_t                                    Gpe1Blk;
+               uint8_t                                     Pm1EvtLen;
+               uint8_t                                     Pm1CntLen;
+               uint8_t                                     Pm2CntLen;
+               uint8_t                                     PmTmrLen;
+               uint8_t                                     Gpe0BlkLen;
+               uint8_t                                     Gpe1BlkLen;
+               uint8_t                                     Gpe1Base;
+               uint8_t                                     CstCnt;
+               uint16_t                                    PLvl2Lat;
+               uint16_t                                    PLvl3Lat;
+               uint16_t                                    FlushSize;
+               uint16_t                                    FlushStride;
+               uint8_t                                     DutyOffset;
+               uint8_t                                     DutyWidth;
+               uint8_t                                     DayAlrm;
+               uint8_t                                     MonAlrm;
+               uint8_t                                     Century;
+               uint16_t                                    IaPcBootArch;
+               uint8_t                                     Reserved1;
+               uint32_t                                    Flags;
                ACPI_GENERIC_ADDRESS_STRUCTURE    ResetReg;
-               u8                                     ResetValue;
-               u8                                     Reserved2[3];
-               u64                                    XFirmwareCtrl;
-               u64                                    XDsdt;
+               uint8_t                                     ResetValue;
+               uint8_t                                     Reserved2[3];
+               uint64_t                                    XFirmwareCtrl;
+               uint64_t                                    XDsdt;
                ACPI_GENERIC_ADDRESS_STRUCTURE    XPm1aEvtBlk;
                ACPI_GENERIC_ADDRESS_STRUCTURE    XPm1bEvtBlk;
                ACPI_GENERIC_ADDRESS_STRUCTURE    XPm1aCntBlk;
@@ -212,15 +226,15 @@
 // Firmware ACPI Control Structure (FACS)
 //
 typedef struct {
-               u32                               Signature;
-               u32                               Length;
-               u32                               HardwareSignature;
-               u32                               FirmwareWakingVector;
-               u32                               GlobalLock;
-               u32                               Flags;
-               u64                               XFirmwareWakingVector;
-               u8                                Version;
-               u8                                Reserved[31];
+               uint32_t                               Signature;
+               uint32_t                               Length;
+               uint32_t                               HardwareSignature;
+               uint32_t                               FirmwareWakingVector;
+               uint32_t                               GlobalLock;
+               uint32_t                               Flags;
+               uint64_t                               XFirmwareWakingVector;
+               uint8_t                                Version;
+               uint8_t                                Reserved[31];
 } ACPI_2_0_FACS;
 
 #define ACPI_2_0_FACS_VERSION 0x01
@@ -230,8 +244,8 @@
 //
 typedef struct {
                ACPI_TABLE_HEADER                       Header;
-               u32                                     LocalApicAddress;
-               u32                                     Flags;
+               uint32_t                                     LocalApicAddress;
+               uint32_t                                     Flags;
 } ACPI_2_0_MADT;
 
 #define ACPI_2_0_MADT_REVISION 0x01
@@ -263,11 +277,11 @@
 //
 
 typedef struct {
-               u8                                             Type;
-               u8                                             Length;
-               u8                                             AcpiProcessorId;
-               u8                                             ApicId;
-               u32                                            Flags;
+               uint8_t                                             Type;
+               uint8_t                                             Length;
+               uint8_t                                             
AcpiProcessorId;
+               uint8_t                                             ApicId;
+               uint32_t                                            Flags;
 } ACPI_LOCAL_APIC_STRUCTURE;
 
 //
@@ -281,12 +295,12 @@
 //
 
 typedef struct {
-               u8                                             Type;
-               u8                                             Length;
-               u8                                             IoApicId;
-               u8                                             Reserved;
-               u32                                            IoApicAddress;
-               u32                                            
GlobalSystemInterruptBase;
+               uint8_t                                             Type;
+               uint8_t                                             Length;
+               uint8_t                                             IoApicId;
+               uint8_t                                             Reserved;
+               uint32_t                                            
IoApicAddress;
+               uint32_t                                            
GlobalSystemInterruptBase;
 } ACPI_IO_APIC_STRUCTURE;
 
 // Tabel Signature
@@ -312,6 +326,6 @@
 #define ACPI_TABLE_SIZE (2*1024)  //Currently 2K is enough
 
 void
-AcpiBuildTable(u8* buf);
+AcpiBuildTable(uint8_t* buf);
 
 #endif
diff -r 067b9aacb6c2 -r b3a255e88810 tools/firmware/acpi/acpi_build.c
--- a/tools/firmware/acpi/acpi_build.c  Wed Oct 12 09:11:35 2005
+++ b/tools/firmware/acpi/acpi_build.c  Wed Oct 12 10:07:37 2005
@@ -37,21 +37,21 @@
                ACPI_MULTIPLE_APIC_DESCRIPTION_TABLE *Madt;
                ACPI_2_0_FACS *Facs;
                unsigned char* Dsdt;
-               u32 RsdpOffset;
-               u32 RsdtOffset;
-               u32 XsdtOffset;
-               u32 FadtOffset;
-               u32 MadtOffset;
-               u32 FacsOffset;
-               u32 DsdtOffset;
+               uint32_t RsdpOffset;
+               uint32_t RsdtOffset;
+               uint32_t XsdtOffset;
+               uint32_t FadtOffset;
+               uint32_t MadtOffset;
+               uint32_t FacsOffset;
+               uint32_t DsdtOffset;
 }ACPI_TABLE_ALL;
 
 static 
 void
 MemCopy(void* src, void* dst, int len){
 
-       u8* src0=src;
-       u8* dst0=dst;   
+       uint8_t* src0=src;
+       uint8_t* dst0=dst;      
 
        while(len--){
                *(dst0++)=*(src0++);
@@ -62,8 +62,8 @@
 void
 SetCheckSum(
   void*  Table, 
-  u32 ChecksumOffset,
-  u32 Length
+  uint32_t ChecksumOffset,
+  uint32_t Length
 )
 /*
  * Routine Description:
@@ -76,23 +76,23 @@
  *     Length:         Length of Table
  */
 {
-       u8 Sum = 0;  
-       u8 *Ptr;
+       uint8_t Sum = 0;  
+       uint8_t *Ptr;
 
        Ptr=Table;
        Ptr[ChecksumOffset]=0;
        while (Length--) {    
-               Sum = (u8)(Sum + (*Ptr++));
+               Sum = (uint8_t)(Sum + (*Ptr++));
        }
        
        Ptr = Table;
-       Ptr[ChecksumOffset] = (u8) (0xff - Sum + 1);
+       Ptr[ChecksumOffset] = (uint8_t) (0xff - Sum + 1);
 }
 
 //
 //  FIELD_OFFSET - returns the byte offset to a field within a structure
 //
-#define FIELD_OFFSET(TYPE,Field) ((u32)(&(((TYPE *) 0)->Field)))
+#define FIELD_OFFSET(TYPE,Field) ((uint32_t)(&(((TYPE *) 0)->Field)))
 
 static
 void
@@ -106,9 +106,9 @@
  */
 {    
        // RSDP Update  
-       table->Rsdp->RsdtAddress = (u32)(ACPI_PHYSICAL_ADDRESS+
+       table->Rsdp->RsdtAddress = (uint32_t)(ACPI_PHYSICAL_ADDRESS+
                                        table->RsdtOffset);
-       table->Rsdp->XsdtAddress = (u64)(ACPI_PHYSICAL_ADDRESS+
+       table->Rsdp->XsdtAddress = (uint64_t)(ACPI_PHYSICAL_ADDRESS+
                                        table->XsdtOffset);
        SetCheckSum(table->Rsdp,
                                        FIELD_OFFSET(ACPI_1_0_RSDP, Checksum),
@@ -122,37 +122,37 @@
 
        
        //RSDT Update
-       table->Rsdt->Entry[0] = (u32)(ACPI_PHYSICAL_ADDRESS + 
+       table->Rsdt->Entry[0] = (uint32_t)(ACPI_PHYSICAL_ADDRESS + 
                                        table->FadtOffset);     
-       table->Rsdt->Entry[1] = (u32)(ACPI_PHYSICAL_ADDRESS + 
+       table->Rsdt->Entry[1] = (uint32_t)(ACPI_PHYSICAL_ADDRESS + 
                                        table->MadtOffset);
        table->Rsdt->Header.Length = sizeof (ACPI_TABLE_HEADER) +
-                                       2*sizeof(u32);
+                                       2*sizeof(uint32_t);
        SetCheckSum(table->Rsdt,
                                        FIELD_OFFSET(ACPI_TABLE_HEADER, 
Checksum),
                                        table->Rsdt->Header.Length
                           );   
        
        //XSDT  Update
-       table->Xsdt->Entry[0] = (u64)(ACPI_PHYSICAL_ADDRESS +
+       table->Xsdt->Entry[0] = (uint64_t)(ACPI_PHYSICAL_ADDRESS +
                                        table->FadtOffset);
-       table->Xsdt->Entry[1] = (u64)(ACPI_PHYSICAL_ADDRESS + 
+       table->Xsdt->Entry[1] = (uint64_t)(ACPI_PHYSICAL_ADDRESS + 
                                        table->MadtOffset);     
        table->Xsdt->Header.Length = sizeof (ACPI_TABLE_HEADER) + 
-                                       2*sizeof(u64);
+                                       2*sizeof(uint64_t);
        SetCheckSum(table->Xsdt,
                                        FIELD_OFFSET(ACPI_TABLE_HEADER, 
Checksum),
                                        table->Xsdt->Header.Length
                           );
 
        // FADT Update
-       table->Fadt->Dsdt = (u32)(ACPI_PHYSICAL_ADDRESS + 
+       table->Fadt->Dsdt = (uint32_t)(ACPI_PHYSICAL_ADDRESS + 
                                        table->DsdtOffset);     
-       table->Fadt->XDsdt = (u64)(ACPI_PHYSICAL_ADDRESS + 
+       table->Fadt->XDsdt = (uint64_t)(ACPI_PHYSICAL_ADDRESS + 
                                   table->DsdtOffset);
-       table->Fadt->FirmwareCtrl = (u32)(ACPI_PHYSICAL_ADDRESS +
+       table->Fadt->FirmwareCtrl = (uint32_t)(ACPI_PHYSICAL_ADDRESS +
                                        table->FacsOffset);
-       table->Fadt->XFirmwareCtrl = (u64)(ACPI_PHYSICAL_ADDRESS + 
+       table->Fadt->XFirmwareCtrl = (uint64_t)(ACPI_PHYSICAL_ADDRESS + 
                                        table->FacsOffset);     
        SetCheckSum(table->Fadt,
                                        FIELD_OFFSET(ACPI_TABLE_HEADER, 
Checksum),
@@ -167,7 +167,7 @@
 }
 
 void
-AcpiBuildTable(u8* buf)
+AcpiBuildTable(uint8_t* buf)
 /*
  * Copy all the ACPI table to buffer
  * Buffer Layout:
diff -r 067b9aacb6c2 -r b3a255e88810 tools/firmware/vmxassist/vm86.c
--- a/tools/firmware/vmxassist/vm86.c   Wed Oct 12 09:11:35 2005
+++ b/tools/firmware/vmxassist/vm86.c   Wed Oct 12 10:07:37 2005
@@ -465,7 +465,7 @@
  * Emulate a segment load in protected mode
  */
 int
-load_seg(unsigned long sel, u32 *base, u32 *limit, union vmcs_arbytes *arbytes)
+load_seg(unsigned long sel, uint32_t *base, uint32_t *limit, union 
vmcs_arbytes *arbytes)
 {
        unsigned long long entry;
 
diff -r 067b9aacb6c2 -r b3a255e88810 tools/firmware/vmxassist/vm86.h
--- a/tools/firmware/vmxassist/vm86.h   Wed Oct 12 09:11:35 2005
+++ b/tools/firmware/vmxassist/vm86.h   Wed Oct 12 10:07:37 2005
@@ -22,15 +22,6 @@
 
 #ifndef __ASSEMBLY__
 #include <stdint.h>
-
-typedef uint8_t            u8;
-typedef uint16_t           u16;
-typedef uint32_t           u32;
-typedef uint64_t           u64;
-typedef int8_t             s8;
-typedef int16_t            s16;
-typedef int32_t            s32;
-typedef int64_t            s64;
 #endif
 
 #include <xen/vmx_assist.h>
diff -r 067b9aacb6c2 -r b3a255e88810 tools/ioemu/hw/ioapic.c
--- a/tools/ioemu/hw/ioapic.c   Wed Oct 12 09:11:35 2005
+++ b/tools/ioemu/hw/ioapic.c   Wed Oct 12 10:07:37 2005
@@ -493,7 +493,7 @@
     }
 }
 
-static inline int __fls(u32 word)
+static inline int __fls(uint32_t word)
 {
     int bit;
     __asm__("bsrl %1,%0"
@@ -581,7 +581,7 @@
     ioapic_set_irq(ioapic, irq, level);
 }
 
-static inline int find_highest_bit(u32 *data, int length){
+static inline int find_highest_bit(uint32_t *data, int length){
         while(length && !data[--length]);
             return __fls(data[length]) +  32 * length;
 }
diff -r 067b9aacb6c2 -r b3a255e88810 tools/ioemu/target-i386-dm/helper2.c
--- a/tools/ioemu/target-i386-dm/helper2.c      Wed Oct 12 09:11:35 2005
+++ b/tools/ioemu/target-i386-dm/helper2.c      Wed Oct 12 10:07:37 2005
@@ -122,7 +122,7 @@
 //the evtchn fd for polling
 int evtchn_fd = -1;
 //the evtchn port for polling the notification, should be inputed as bochs's 
parameter
-u16 ioreq_remote_port, ioreq_local_port;
+uint16_t ioreq_remote_port, ioreq_local_port;
 
 //some functions to handle the io req packet
 void
@@ -157,9 +157,9 @@
 ioreq_t* cpu_get_ioreq(void)
 {
        int rc;
-       u16 buf[2];
-       rc = read(evtchn_fd, buf, 2);
-       if (rc == 2 && buf[0] == ioreq_local_port){//got only one matched 16bit 
port index
+       uint16_t port;
+       rc = read(evtchn_fd, &port, sizeof(port));
+       if ((rc == sizeof(port)) && (port == ioreq_local_port)) {
                // unmask the wanted port again
                write(evtchn_fd, &ioreq_local_port, 2);
 
@@ -208,13 +208,13 @@
                                    int len, int is_write);
 
 static inline void
-read_physical(u64 addr, unsigned long size, void *val)
+read_physical(uint64_t addr, unsigned long size, void *val)
 {
         return cpu_physical_memory_rw((target_phys_addr_t)addr, val, size, 0);
 }
 
 static inline void
-write_physical(u64 addr, unsigned long size, void *val)
+write_physical(uint64_t addr, unsigned long size, void *val)
 {
         return cpu_physical_memory_rw((target_phys_addr_t)addr, val, size, 1);
 }
diff -r 067b9aacb6c2 -r b3a255e88810 tools/ioemu/vl.c
--- a/tools/ioemu/vl.c  Wed Oct 12 09:11:35 2005
+++ b/tools/ioemu/vl.c  Wed Oct 12 10:07:37 2005
@@ -2382,7 +2382,7 @@
 }
 
 int
-setup_mapping(int xc_handle, u32 dom, unsigned long toptab, unsigned long  
*mem_page_array, unsigned long *page_table_array, unsigned long v_start, 
unsigned long v_end)
+setup_mapping(int xc_handle, uint32_t dom, unsigned long toptab, unsigned long 
 *mem_page_array, unsigned long *page_table_array, unsigned long v_start, 
unsigned long v_end)
 {
     l1_pgentry_t *vl1tab=NULL, *vl1e=NULL;
     l2_pgentry_t *vl2tab[4] = {NULL, NULL, NULL, NULL};
@@ -2449,7 +2449,7 @@
 }
 
 void
-unsetup_mapping(int xc_handle, u32 dom, unsigned long toptab, unsigned long 
v_start, unsigned long v_end)
+unsetup_mapping(int xc_handle, uint32_t dom, unsigned long toptab, unsigned 
long v_start, unsigned long v_end)
 {
     l1_pgentry_t *vl1tab=NULL, *vl1e=NULL;
     l2_pgentry_t *vl2tab[4], *vl2e=NULL, *vl2_table = NULL;
@@ -2806,7 +2806,7 @@
 
             case QEMU_OPTION_p:
                 {
-                  extern u16 ioreq_remote_port;
+                  extern uint16_t ioreq_remote_port;
                   ioreq_remote_port = atoi(optarg);
                   printf("port: %d\n", ioreq_remote_port);
                 }
diff -r 067b9aacb6c2 -r b3a255e88810 tools/libxc/xc_bvtsched.c
--- a/tools/libxc/xc_bvtsched.c Wed Oct 12 09:11:35 2005
+++ b/tools/libxc/xc_bvtsched.c Wed Oct 12 10:07:37 2005
@@ -39,10 +39,10 @@
 }
 
 int xc_bvtsched_domain_set(int xc_handle,
-                           u32 domid,
-                           u32 mcuadv,
+                           uint32_t domid,
+                           uint32_t mcuadv,
                            int warpback,
-                           s32 warpvalue,
+                           int32_t warpvalue,
                            long long warpl,
                            long long warpu)
 {
@@ -64,10 +64,10 @@
 
 
 int xc_bvtsched_domain_get(int xc_handle,
-                           u32 domid,
-                           u32 *mcuadv,
+                           uint32_t domid,
+                           uint32_t *mcuadv,
                            int *warpback,
-                           s32 *warpvalue,
+                           int32_t *warpvalue,
                            long long *warpl,
                            long long *warpu)
 {
diff -r 067b9aacb6c2 -r b3a255e88810 tools/libxc/xc_core.c
--- a/tools/libxc/xc_core.c     Wed Oct 12 09:11:35 2005
+++ b/tools/libxc/xc_core.c     Wed Oct 12 10:07:37 2005
@@ -11,7 +11,7 @@
 
 static int
 copy_from_domain_page(int xc_handle,
-                      u32 domid,
+                      uint32_t domid,
                       unsigned long *page_array,
                       unsigned long src_pfn,
                       void *dst_page)
@@ -27,7 +27,7 @@
 
 int 
 xc_domain_dumpcore(int xc_handle,
-                   u32 domid,
+                   uint32_t domid,
                    const char *corename)
 {
     unsigned long nr_pages;
diff -r 067b9aacb6c2 -r b3a255e88810 tools/libxc/xc_domain.c
--- a/tools/libxc/xc_domain.c   Wed Oct 12 09:11:35 2005
+++ b/tools/libxc/xc_domain.c   Wed Oct 12 10:07:37 2005
@@ -10,8 +10,8 @@
 #include <xen/memory.h>
 
 int xc_domain_create(int xc_handle,
-                     u32 ssidref,
-                     u32 *pdomid)
+                     uint32_t ssidref,
+                     uint32_t *pdomid)
 {
     int err;
     dom0_op_t op;
@@ -22,13 +22,13 @@
     if ( (err = do_dom0_op(xc_handle, &op)) != 0 )
         return err;
 
-    *pdomid = (u16)op.u.createdomain.domain;
+    *pdomid = (uint16_t)op.u.createdomain.domain;
     return 0;
 }    
 
 
 int xc_domain_pause(int xc_handle, 
-                    u32 domid)
+                    uint32_t domid)
 {
     dom0_op_t op;
     op.cmd = DOM0_PAUSEDOMAIN;
@@ -38,7 +38,7 @@
 
 
 int xc_domain_unpause(int xc_handle,
-                      u32 domid)
+                      uint32_t domid)
 {
     dom0_op_t op;
     op.cmd = DOM0_UNPAUSEDOMAIN;
@@ -48,7 +48,7 @@
 
 
 int xc_domain_destroy(int xc_handle,
-                      u32 domid)
+                      uint32_t domid)
 {
     dom0_op_t op;
     op.cmd = DOM0_DESTROYDOMAIN;
@@ -57,7 +57,7 @@
 }
 
 int xc_domain_pincpu(int xc_handle,
-                     u32 domid, 
+                     uint32_t domid, 
                      int vcpu,
                      cpumap_t *cpumap)
 {
@@ -71,12 +71,12 @@
 
 
 int xc_domain_getinfo(int xc_handle,
-                      u32 first_domid,
+                      uint32_t first_domid,
                       unsigned int max_doms,
                       xc_dominfo_t *info)
 {
     unsigned int nr_doms;
-    u32 next_domid = first_domid;
+    uint32_t next_domid = first_domid;
     dom0_op_t op;
     int rc = 0; 
 
@@ -88,7 +88,7 @@
         op.u.getdomaininfo.domain = (domid_t)next_domid;
         if ( (rc = do_dom0_op(xc_handle, &op)) < 0 )
             break;
-        info->domid      = (u16)op.u.getdomaininfo.domain;
+        info->domid      = (uint16_t)op.u.getdomaininfo.domain;
 
         info->dying    = !!(op.u.getdomaininfo.flags & DOMFLAGS_DYING);
         info->shutdown = !!(op.u.getdomaininfo.flags & DOMFLAGS_SHUTDOWN);
@@ -117,7 +117,7 @@
         memcpy(&info->cpumap, &op.u.getdomaininfo.cpumap, 
                sizeof(info->cpumap));
 
-        next_domid = (u16)op.u.getdomaininfo.domain + 1;
+        next_domid = (uint16_t)op.u.getdomaininfo.domain + 1;
         info++;
     }
 
@@ -127,7 +127,7 @@
 }
 
 int xc_domain_getinfolist(int xc_handle,
-                          u32 first_domain,
+                          uint32_t first_domain,
                           unsigned int max_domains,
                           xc_domaininfo_t *info)
 {
@@ -154,8 +154,8 @@
 }
 
 int xc_domain_get_vcpu_context(int xc_handle,
-                               u32 domid,
-                               u32 vcpu,
+                               uint32_t domid,
+                               uint32_t vcpu,
                                vcpu_guest_context_t *ctxt)
 {
     int rc;
@@ -163,7 +163,7 @@
 
     op.cmd = DOM0_GETVCPUCONTEXT;
     op.u.getvcpucontext.domain = (domid_t)domid;
-    op.u.getvcpucontext.vcpu   = (u16)vcpu;
+    op.u.getvcpucontext.vcpu   = (uint16_t)vcpu;
     op.u.getvcpucontext.ctxt   = ctxt;
 
     if ( (ctxt != NULL) &&
@@ -183,7 +183,7 @@
 
 
 int xc_shadow_control(int xc_handle,
-                      u32 domid, 
+                      uint32_t domid, 
                       unsigned int sop,
                       unsigned long *dirty_bitmap,
                       unsigned long pages,
@@ -207,7 +207,7 @@
 }
 
 int xc_domain_setcpuweight(int xc_handle,
-                           u32 domid,
+                           uint32_t domid,
                            float weight)
 {
     int sched_id;
@@ -221,9 +221,9 @@
     {
         case SCHED_BVT:
         {
-            u32 mcuadv;
+            uint32_t mcuadv;
             int warpback;
-            s32 warpvalue;
+            int32_t warpvalue;
             long long warpl;
             long long warpu;
 
@@ -250,7 +250,7 @@
 }
 
 int xc_domain_setmaxmem(int xc_handle,
-                        u32 domid, 
+                        uint32_t domid, 
                         unsigned int max_memkb)
 {
     dom0_op_t op;
@@ -261,7 +261,7 @@
 }
 
 int xc_domain_memory_increase_reservation(int xc_handle,
-                                          u32 domid, 
+                                          uint32_t domid, 
                                           unsigned long nr_extents,
                                           unsigned int extent_order,
                                           unsigned int address_bits,
@@ -293,7 +293,7 @@
 }
 
 int xc_domain_memory_decrease_reservation(int xc_handle,
-                                          u32 domid, 
+                                          uint32_t domid, 
                                           unsigned long nr_extents,
                                           unsigned int extent_order,
                                           unsigned long *extent_start)
diff -r 067b9aacb6c2 -r b3a255e88810 tools/libxc/xc_evtchn.c
--- a/tools/libxc/xc_evtchn.c   Wed Oct 12 09:11:35 2005
+++ b/tools/libxc/xc_evtchn.c   Wed Oct 12 10:07:37 2005
@@ -33,8 +33,8 @@
 
 
 int xc_evtchn_alloc_unbound(int xc_handle,
-                            u32 dom,
-                            u32 remote_dom)
+                            uint32_t dom,
+                            uint32_t remote_dom)
 {
     int         rc;
     evtchn_op_t op = {
@@ -50,7 +50,7 @@
 
 
 int xc_evtchn_status(int xc_handle,
-                     u32 dom,
+                     uint32_t dom,
                      int port,
                      xc_evtchn_status_t *status)
 {
diff -r 067b9aacb6c2 -r b3a255e88810 tools/libxc/xc_gnttab.c
--- a/tools/libxc/xc_gnttab.c   Wed Oct 12 09:11:35 2005
+++ b/tools/libxc/xc_gnttab.c   Wed Oct 12 10:07:37 2005
@@ -40,12 +40,12 @@
 
 
 int xc_gnttab_map_grant_ref(int         xc_handle,
-                            u64    host_virt_addr,
-                            u32         dom,
-                            u16         ref,
-                            u16         flags,
-                            s16        *handle,
-                            u64   *dev_bus_addr)
+                            uint64_t    host_virt_addr,
+                            uint32_t    dom,
+                            uint16_t    ref,
+                            uint16_t    flags,
+                            int16_t    *handle,
+                            uint64_t   *dev_bus_addr)
 {
     struct gnttab_map_grant_ref op;
     int rc;
@@ -67,10 +67,10 @@
 
 
 int xc_gnttab_unmap_grant_ref(int       xc_handle,
-                              u64  host_virt_addr,
-                              u64  dev_bus_addr,
-                              u16       handle,
-                              s16      *status)
+                              uint64_t  host_virt_addr,
+                              uint64_t  dev_bus_addr,
+                              uint16_t  handle,
+                              int16_t  *status)
 {
     struct gnttab_unmap_grant_ref op;
     int rc;
@@ -89,9 +89,9 @@
 }
 
 int xc_gnttab_setup_table(int        xc_handle,
-                          u32        dom,
-                          u16        nr_frames,
-                          s16       *status,
+                          uint32_t   dom,
+                          uint16_t   nr_frames,
+                          int16_t   *status,
                           unsigned long **frame_list)
 {
     struct gnttab_setup_table op;
@@ -111,8 +111,8 @@
 }
 
 int xc_gnttab_dump_table(int        xc_handle,
-                         u32        dom,
-                         s16       *status)
+                         uint32_t   dom,
+                         int16_t   *status)
 {
     struct gnttab_dump_table op;
     int rc;
diff -r 067b9aacb6c2 -r b3a255e88810 tools/libxc/xc_ia64_stubs.c
--- a/tools/libxc/xc_ia64_stubs.c       Wed Oct 12 09:11:35 2005
+++ b/tools/libxc/xc_ia64_stubs.c       Wed Oct 12 10:07:37 2005
@@ -1,14 +1,14 @@
 #include "xg_private.h"
 #include "xenguest.h"
 
-int xc_linux_save(int xc_handle, int io_fd, u32 dom, u32 max_iters, 
-                  u32 max_factor, u32 flags)
+int xc_linux_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters, 
+                  uint32_t max_factor, uint32_t flags)
 {
     PERROR("xc_linux_save not implemented\n");
     return -1;
 }
 
-int xc_linux_restore(int xc_handle, int io_fd, u32 dom, unsigned long nr_pfns,
+int xc_linux_restore(int xc_handle, int io_fd, uint32_t dom, unsigned long 
nr_pfns,
                      unsigned int store_evtchn, unsigned long *store_mfn,
                      unsigned int console_evtchn, unsigned long *console_mfn)
 {
@@ -17,7 +17,7 @@
 }
 
 int xc_vmx_build(int xc_handle,
-                   u32 domid,
+                   uint32_t domid,
                    int memsize,
                    const char *image_name,
                    struct mem_map *mem_mapp,
@@ -35,7 +35,7 @@
 
 int
 xc_plan9_build(int xc_handle,
-               u32 domid,
+               uint32_t domid,
                const char *image_name,
                const char *cmdline,
                unsigned int control_evtchn, unsigned long flags)
diff -r 067b9aacb6c2 -r b3a255e88810 tools/libxc/xc_linux_build.c
--- a/tools/libxc/xc_linux_build.c      Wed Oct 12 09:11:35 2005
+++ b/tools/libxc/xc_linux_build.c      Wed Oct 12 10:07:37 2005
@@ -64,7 +64,7 @@
 
 #define alloc_pt(ltab, vltab)                                           \
 do {                                                                    \
-    ltab = (u64)page_array[ppt_alloc++] << PAGE_SHIFT;                  \
+    ltab = (uint64_t)page_array[ppt_alloc++] << PAGE_SHIFT;                  \
     if ( vltab != NULL )                                                \
         munmap(vltab, PAGE_SIZE);                                       \
     if ( (vltab = xc_map_foreign_range(xc_handle, dom, PAGE_SIZE,       \
@@ -76,7 +76,7 @@
 
 #if defined(__i386__)
 
-static int setup_pg_tables(int xc_handle, u32 dom,
+static int setup_pg_tables(int xc_handle, uint32_t dom,
                            vcpu_guest_context_t *ctxt,
                            unsigned long dsi_v_start,
                            unsigned long v_end,
@@ -123,7 +123,7 @@
     return -1;
 }
 
-static int setup_pg_tables_pae(int xc_handle, u32 dom,
+static int setup_pg_tables_pae(int xc_handle, uint32_t dom,
                                vcpu_guest_context_t *ctxt,
                                unsigned long dsi_v_start,
                                unsigned long v_end,
@@ -134,7 +134,7 @@
     l1_pgentry_64_t *vl1tab = NULL, *vl1e = NULL;
     l2_pgentry_64_t *vl2tab = NULL, *vl2e = NULL;
     l3_pgentry_64_t *vl3tab = NULL, *vl3e = NULL;
-    u64 l1tab, l2tab, l3tab;
+    uint64_t l1tab, l2tab, l3tab;
     unsigned long ppt_alloc, count, nmfn;
 
     /* First allocate page for page dir. */
@@ -173,7 +173,7 @@
             *vl2e++ = l1tab | L2_PROT;
         }
         
-        *vl1e = ((u64)page_array[count] << PAGE_SHIFT) | L1_PROT;
+        *vl1e = ((uint64_t)page_array[count] << PAGE_SHIFT) | L1_PROT;
         if ( (count >= ((vpt_start-dsi_v_start)>>PAGE_SHIFT)) &&
              (count <  ((vpt_end  -dsi_v_start)>>PAGE_SHIFT)) ) 
             *vl1e &= ~_PAGE_RW;
@@ -199,7 +199,7 @@
 
 #if defined(__x86_64__)
 
-static int setup_pg_tables_64(int xc_handle, u32 dom,
+static int setup_pg_tables_64(int xc_handle, uint32_t dom,
                               vcpu_guest_context_t *ctxt,
                               unsigned long dsi_v_start,
                               unsigned long v_end,
@@ -280,7 +280,7 @@
 #ifdef __ia64__
 #include <asm/fpu.h> /* for FPSR_DEFAULT */
 static int setup_guest(int xc_handle,
-                       u32 dom,
+                       uint32_t dom,
                        char *image, unsigned long image_size,
                        gzFile initrd_gfd, unsigned long initrd_len,
                        unsigned long nr_pages,
@@ -346,7 +346,7 @@
     *store_mfn = page_array[1];
     *console_mfn = page_array[2];
     printf("store_mfn: 0x%lx, console_mfn: 0x%lx\n",
-           (u64)store_mfn, (u64)console_mfn);
+           (uint64_t)store_mfn, (uint64_t)console_mfn);
 
     start_info = xc_map_foreign_range(
         xc_handle, dom, PAGE_SIZE, PROT_READ|PROT_WRITE, page_array[0]);
@@ -367,7 +367,7 @@
 }
 #else /* x86 */
 static int setup_guest(int xc_handle,
-                       u32 dom,
+                       uint32_t dom,
                        char *image, unsigned long image_size,
                        gzFile initrd_gfd, unsigned long initrd_len,
                        unsigned long nr_pages,
@@ -573,7 +573,7 @@
     {
         if ( xc_add_mmu_update(
             xc_handle, mmu,
-            ((u64)page_array[count] << PAGE_SHIFT) | MMU_MACHPHYS_UPDATE,
+            ((uint64_t)page_array[count] << PAGE_SHIFT) | MMU_MACHPHYS_UPDATE,
             count) )
         {
             fprintf(stderr,"m2p update failure p=%lx m=%lx\n",
@@ -679,7 +679,7 @@
 #endif
 
 int xc_linux_build(int xc_handle,
-                   u32 domid,
+                   uint32_t domid,
                    const char *image_name,
                    const char *ramdisk_name,
                    const char *cmdline,
@@ -735,7 +735,7 @@
     op.cmd = DOM0_GETDOMAININFO;
     op.u.getdomaininfo.domain = (domid_t)domid;
     if ( (xc_dom0_op(xc_handle, &op) < 0) || 
-         ((u16)op.u.getdomaininfo.domain != domid) )
+         ((uint16_t)op.u.getdomaininfo.domain != domid) )
     {
         PERROR("Could not get info on domain");
         goto error_out;
diff -r 067b9aacb6c2 -r b3a255e88810 tools/libxc/xc_linux_restore.c
--- a/tools/libxc/xc_linux_restore.c    Wed Oct 12 09:11:35 2005
+++ b/tools/libxc/xc_linux_restore.c    Wed Oct 12 10:07:37 2005
@@ -51,7 +51,7 @@
     return r;
 }
 
-int xc_linux_restore(int xc_handle, int io_fd, u32 dom, unsigned long nr_pfns,
+int xc_linux_restore(int xc_handle, int io_fd, uint32_t dom, unsigned long 
nr_pfns,
                      unsigned int store_evtchn, unsigned long *store_mfn,
                      unsigned int console_evtchn, unsigned long *console_mfn)
 {
diff -r 067b9aacb6c2 -r b3a255e88810 tools/libxc/xc_linux_save.c
--- a/tools/libxc/xc_linux_save.c       Wed Oct 12 09:11:35 2005
+++ b/tools/libxc/xc_linux_save.c       Wed Oct 12 10:07:37 2005
@@ -245,7 +245,7 @@
     return write(io_fd, buf, n);
 }
 
-static int print_stats( int xc_handle, u32 domid, 
+static int print_stats( int xc_handle, uint32_t domid, 
                         int pages_sent, xc_shadow_control_stats_t *stats,
                         int print )
 {
@@ -299,7 +299,7 @@
     return 0;
 }
 
-static int analysis_phase( int xc_handle, u32 domid, 
+static int analysis_phase( int xc_handle, uint32_t domid, 
                            int nr_pfns, unsigned long *arr, int runs )
 {
     long long start, now;
@@ -399,8 +399,8 @@
     return -1;
 }
 
-int xc_linux_save(int xc_handle, int io_fd, u32 dom, u32 max_iters, 
-                  u32 max_factor, u32 flags)
+int xc_linux_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters, 
+                  uint32_t max_factor, uint32_t flags)
 {
     xc_dominfo_t info;
 
diff -r 067b9aacb6c2 -r b3a255e88810 tools/libxc/xc_load_aout9.c
--- a/tools/libxc/xc_load_aout9.c       Wed Oct 12 09:11:35 2005
+++ b/tools/libxc/xc_load_aout9.c       Wed Oct 12 10:07:37 2005
@@ -18,8 +18,8 @@
 #define KOFFSET(_p)       ((_p)&~KZERO)
 
 static int parseaout9image(char *, unsigned long, struct domain_setup_info *);
-static int loadaout9image(char *, unsigned long, int, u32, unsigned long *, 
struct domain_setup_info *);
-static void copyout(int, u32, unsigned long *, unsigned long, void *, int);
+static int loadaout9image(char *, unsigned long, int, uint32_t, unsigned long 
*, struct domain_setup_info *);
+static void copyout(int, uint32_t, unsigned long *, unsigned long, void *, 
int);
 struct Exec *get_header(char *, unsigned long, struct Exec *);
 
 
@@ -79,7 +79,7 @@
 loadaout9image(
     char *image,
     unsigned long image_size,
-    int xch, u32 dom,
+    int xch, uint32_t dom,
     unsigned long *parray,
     struct domain_setup_info *dsi)
 {
@@ -108,7 +108,7 @@
  */
 static void
 copyout(
-    int xch, u32 dom,
+    int xch, uint32_t dom,
     unsigned long *parray,
     unsigned long addr,
     void *buf,
@@ -135,8 +135,8 @@
     }
 }
 
-#define swap16(_v) ((((u16)(_v)>>8)&0xff)|(((u16)(_v)&0xff)<<8))
-#define swap32(_v) (((u32)swap16((u16)(_v))<<16)|(u32)swap16((u32)((_v)>>16)))
+#define swap16(_v) ((((uint16_t)(_v)>>8)&0xff)|(((uint16_t)(_v)&0xff)<<8))
+#define swap32(_v) 
(((uint32_t)swap16((uint16_t)(_v))<<16)|(uint32_t)swap16((uint32_t)((_v)>>16)))
 
 /*
  * Decode the header from the start of image and return it.
@@ -147,7 +147,7 @@
     unsigned long image_size,
     struct Exec *ehdr)
 {
-    u32 *v, x;
+    uint32_t *v, x;
     int i;
 
     if (A9_MAGIC == 0)
@@ -157,9 +157,9 @@
         return 0;
 
     /* ... all big endian words */
-    v = (u32 *)ehdr;
+    v = (uint32_t *)ehdr;
     for (i = 0; i < sizeof(*ehdr); i += 4) {
-        x = *(u32 *)&image[i];
+        x = *(uint32_t *)&image[i];
         v[i/4] = swap32(x);
     }
 
diff -r 067b9aacb6c2 -r b3a255e88810 tools/libxc/xc_load_bin.c
--- a/tools/libxc/xc_load_bin.c Wed Oct 12 09:11:35 2005
+++ b/tools/libxc/xc_load_bin.c Wed Oct 12 10:07:37 2005
@@ -11,14 +11,14 @@
  * The layout of the xen_bin_image table is:
  *
  * Offset Type Name          Note
- * 0      u32  magic         required
- * 4      u32  flags         required
- * 8      u32  checksum      required
- * 12     u32  header_addr   required
- * 16     u32  load_addr     required
- * 20     u32  load_end_addr required
- * 24     u32  bss_end_addr  required
- * 28     u32  entry_addr    required
+ * 0      uint32_t  magic         required
+ * 4      uint32_t  flags         required
+ * 8      uint32_t  checksum      required
+ * 12     uint32_t  header_addr   required
+ * 16     uint32_t  load_addr     required
+ * 20     uint32_t  load_end_addr required
+ * 24     uint32_t  bss_end_addr  required
+ * 28     uint32_t  entry_addr    required
  *
  * - magic
  *   Magic number identifying the table. For images to be loaded by Xen 3, the
@@ -105,7 +105,7 @@
     char *image, unsigned long image_size, struct domain_setup_info *dsi);
 static int
 loadbinimage(
-    char *image, unsigned long image_size, int xch, u32 dom,
+    char *image, unsigned long image_size, int xch, uint32_t dom,
     unsigned long *parray, struct domain_setup_info *dsi);
 
 int probe_bin(char *image,
@@ -237,7 +237,7 @@
 
 static int
 loadbinimage(
-    char *image, unsigned long image_size, int xch, u32 dom,
+    char *image, unsigned long image_size, int xch, uint32_t dom,
     unsigned long *parray, struct domain_setup_info *dsi)
 {
     unsigned long size;
diff -r 067b9aacb6c2 -r b3a255e88810 tools/libxc/xc_load_elf.c
--- a/tools/libxc/xc_load_elf.c Wed Oct 12 09:11:35 2005
+++ b/tools/libxc/xc_load_elf.c Wed Oct 12 10:07:37 2005
@@ -22,11 +22,11 @@
     char *image, unsigned long image_size, struct domain_setup_info *dsi);
 static int
 loadelfimage(
-    char *image, unsigned long image_size, int xch, u32 dom,
+    char *image, unsigned long image_size, int xch, uint32_t dom,
     unsigned long *parray, struct domain_setup_info *dsi);
 static int
 loadelfsymtab(
-    char *image, int xch, u32 dom, unsigned long *parray,
+    char *image, int xch, uint32_t dom, unsigned long *parray,
     struct domain_setup_info *dsi);
 
 int probe_elf(char *image,
@@ -168,7 +168,7 @@
 
 static int
 loadelfimage(
-    char *image, unsigned long elfsize, int xch, u32 dom,
+    char *image, unsigned long elfsize, int xch, uint32_t dom,
     unsigned long *parray, struct domain_setup_info *dsi)
 {
     Elf_Ehdr *ehdr = (Elf_Ehdr *)image;
@@ -219,7 +219,7 @@
 
 static int
 loadelfsymtab(
-    char *image, int xch, u32 dom, unsigned long *parray,
+    char *image, int xch, uint32_t dom, unsigned long *parray,
     struct domain_setup_info *dsi)
 {
     Elf_Ehdr *ehdr = (Elf_Ehdr *)image, *sym_ehdr;
diff -r 067b9aacb6c2 -r b3a255e88810 tools/libxc/xc_misc.c
--- a/tools/libxc/xc_misc.c     Wed Oct 12 09:11:35 2005
+++ b/tools/libxc/xc_misc.c     Wed Oct 12 10:07:37 2005
@@ -83,7 +83,7 @@
 }
 
 int xc_perfc_control(int xc_handle,
-                     u32 op,
+                     uint32_t op,
                      xc_perfc_desc_t *desc)
 {
     int rc;
diff -r 067b9aacb6c2 -r b3a255e88810 tools/libxc/xc_physdev.c
--- a/tools/libxc/xc_physdev.c  Wed Oct 12 09:11:35 2005
+++ b/tools/libxc/xc_physdev.c  Wed Oct 12 10:07:37 2005
@@ -10,7 +10,7 @@
 #include "xc_private.h"
 
 int xc_physdev_pci_access_modify(int xc_handle,
-                                 u32 domid,
+                                 uint32_t domid,
                                  int bus,
                                  int dev,
                                  int func,
diff -r 067b9aacb6c2 -r b3a255e88810 tools/libxc/xc_private.c
--- a/tools/libxc/xc_private.c  Wed Oct 12 09:11:35 2005
+++ b/tools/libxc/xc_private.c  Wed Oct 12 10:07:37 2005
@@ -8,7 +8,7 @@
 #include "xc_private.h"
 #include <xen/memory.h>
 
-void *xc_map_foreign_batch(int xc_handle, u32 dom, int prot,
+void *xc_map_foreign_batch(int xc_handle, uint32_t dom, int prot,
                            unsigned long *arr, int num )
 {
     privcmd_mmapbatch_t ioctlx; 
@@ -35,7 +35,7 @@
 
 /*******************/
 
-void *xc_map_foreign_range(int xc_handle, u32 dom,
+void *xc_map_foreign_range(int xc_handle, uint32_t dom,
                            int size, int prot,
                            unsigned long mfn )
 {
@@ -66,7 +66,7 @@
 
 /* NB: arr must be mlock'ed */
 int xc_get_pfn_type_batch(int xc_handle, 
-                          u32 dom, int num, unsigned long *arr)
+                          uint32_t dom, int num, unsigned long *arr)
 {
     dom0_op_t op;
     op.cmd = DOM0_GETPAGEFRAMEINFO2;
@@ -79,7 +79,7 @@
 #define GETPFN_ERR (~0U)
 unsigned int get_pfn_type(int xc_handle, 
                           unsigned long mfn, 
-                          u32 dom)
+                          uint32_t dom)
 {
     dom0_op_t op;
     op.cmd = DOM0_GETPAGEFRAMEINFO;
@@ -258,7 +258,7 @@
 
     op.cmd = DOM0_GETVCPUCONTEXT;
     op.u.getvcpucontext.domain = (domid_t)domid;
-    op.u.getvcpucontext.vcpu   = (u16)vcpu;
+    op.u.getvcpucontext.vcpu   = (uint16_t)vcpu;
     op.u.getvcpucontext.ctxt   = NULL;
     if ( (do_dom0_op(xc_handle, &op) < 0) )
     {
@@ -282,7 +282,7 @@
 }
 
 int xc_get_pfn_list(int xc_handle,
-                    u32 domid, 
+                    uint32_t domid, 
                     unsigned long *pfn_buf, 
                     unsigned long max_pfns)
 {
@@ -324,7 +324,7 @@
 
 #ifdef __ia64__
 int xc_ia64_get_pfn_list(int xc_handle,
-                         u32 domid, 
+                         uint32_t domid, 
                          unsigned long *pfn_buf, 
                          unsigned int start_page,
                          unsigned int nr_pages)
@@ -352,7 +352,7 @@
     return (ret < 0) ? -1 : op.u.getmemlist.num_pfns;
 }
 
-long xc_get_max_pages(int xc_handle, u32 domid)
+long xc_get_max_pages(int xc_handle, uint32_t domid)
 {
     dom0_op_t op;
     op.cmd = DOM0_GETDOMAININFO;
@@ -362,7 +362,7 @@
 }
 #endif
 
-long xc_get_tot_pages(int xc_handle, u32 domid)
+long xc_get_tot_pages(int xc_handle, uint32_t domid)
 {
     dom0_op_t op;
     op.cmd = DOM0_GETDOMAININFO;
@@ -372,7 +372,7 @@
 }
 
 int xc_copy_to_domain_page(int xc_handle,
-                           u32 domid,
+                           uint32_t domid,
                            unsigned long dst_pfn, 
                            void *src_page)
 {
@@ -387,8 +387,8 @@
 
 unsigned long xc_get_filesz(int fd)
 {
-    u16 sig;
-    u32 _sz = 0;
+    uint16_t sig;
+    uint32_t _sz = 0;
     unsigned long sz;
 
     lseek(fd, 0, SEEK_SET);
@@ -408,7 +408,7 @@
 }
 
 void xc_map_memcpy(unsigned long dst, char *src, unsigned long size,
-                   int xch, u32 dom, unsigned long *parray,
+                   int xch, uint32_t dom, unsigned long *parray,
                    unsigned long vstart)
 {
     char *va;
@@ -460,7 +460,7 @@
 }
 
 unsigned long xc_make_page_below_4G(
-    int xc_handle, u32 domid, unsigned long mfn)
+    int xc_handle, uint32_t domid, unsigned long mfn)
 {
     unsigned long new_mfn;
 
diff -r 067b9aacb6c2 -r b3a255e88810 tools/libxc/xc_ptrace.c
--- a/tools/libxc/xc_ptrace.c   Wed Oct 12 09:11:35 2005
+++ b/tools/libxc/xc_ptrace.c   Wed Oct 12 10:07:37 2005
@@ -138,7 +138,7 @@
     int perm)
 {
     unsigned long l2p, l1p, p, va = (unsigned long)guest_va;
-    u64 *l3, *l2, *l1;
+    uint64_t *l3, *l2, *l1;
     static void *v;
 
     FETCH_REGS(cpu);
@@ -319,7 +319,7 @@
 xc_ptrace(
     int xc_handle,
     enum __ptrace_request request,
-    u32 domid,
+    uint32_t domid,
     long eaddr,
     long edata)
 {
diff -r 067b9aacb6c2 -r b3a255e88810 tools/libxc/xc_ptrace_core.c
--- a/tools/libxc/xc_ptrace_core.c      Wed Oct 12 09:11:35 2005
+++ b/tools/libxc/xc_ptrace_core.c      Wed Oct 12 10:07:37 2005
@@ -222,7 +222,7 @@
 xc_ptrace_core(
     int xc_handle,
     enum __ptrace_request request,
-    u32 domfd,
+    uint32_t domfd,
     long eaddr,
     long edata)
 {
diff -r 067b9aacb6c2 -r b3a255e88810 tools/libxc/xc_sedf.c
--- a/tools/libxc/xc_sedf.c     Wed Oct 12 09:11:35 2005
+++ b/tools/libxc/xc_sedf.c     Wed Oct 12 10:07:37 2005
@@ -11,7 +11,7 @@
 #include "xc_private.h"
 
 int xc_sedf_domain_set(int xc_handle,
-                          u32 domid, u64 period, u64 slice,u64 latency, u16 
extratime,u16 weight)
+                          uint32_t domid, uint64_t period, uint64_t 
slice,uint64_t latency, uint16_t extratime,uint16_t weight)
 {
     dom0_op_t op;
     struct sedf_adjdom *p = &op.u.adjustdom.u.sedf;
@@ -29,7 +29,7 @@
     return do_dom0_op(xc_handle, &op);
 }
 
-int xc_sedf_domain_get(int xc_handle, u32 domid, u64 *period, u64 *slice, u64* 
latency, u16* extratime, u16* weight)
+int xc_sedf_domain_get(int xc_handle, uint32_t domid, uint64_t *period, 
uint64_t *slice, uint64_t* latency, uint16_t* extratime, uint16_t* weight)
 {
     dom0_op_t op;
     int ret;
diff -r 067b9aacb6c2 -r b3a255e88810 tools/libxc/xc_vmx_build.c
--- a/tools/libxc/xc_vmx_build.c        Wed Oct 12 09:11:35 2005
+++ b/tools/libxc/xc_vmx_build.c        Wed Oct 12 10:07:37 2005
@@ -34,9 +34,9 @@
 #define E820_MAP_OFFSET      0x000002D0
 
 struct e820entry {
-    u64 addr;
-    u64 size;
-    u32 type;
+    uint64_t addr;
+    uint64_t size;
+    uint32_t type;
 } __attribute__((packed));
 
 #define round_pgup(_p)    (((_p)+(PAGE_SIZE-1))&PAGE_MASK)
@@ -47,7 +47,7 @@
     char *elfbase, unsigned long elfsize, struct domain_setup_info *dsi);
 static int
 loadelfimage(
-    char *elfbase, int xch, u32 dom, unsigned long *parray,
+    char *elfbase, int xch, uint32_t dom, unsigned long *parray,
     struct domain_setup_info *dsi);
 
 static unsigned char build_e820map(void *e820_page, unsigned long mem_size)
@@ -122,7 +122,7 @@
  */
 #define VCPU_MAGIC 0x76637075 /* "vcpu" */
 static int
-set_nr_vcpus(int xc_handle, u32 dom, unsigned long *pfn_list,
+set_nr_vcpus(int xc_handle, uint32_t dom, unsigned long *pfn_list,
              struct domain_setup_info *dsi, unsigned long vcpus)
 {
     char          *va_map;
@@ -144,7 +144,7 @@
 }
 
 #ifdef __i386__
-static int zap_mmio_range(int xc_handle, u32 dom,
+static int zap_mmio_range(int xc_handle, uint32_t dom,
                           l2_pgentry_32_t *vl2tab,
                           unsigned long mmio_range_start,
                           unsigned long mmio_range_size)
@@ -173,7 +173,7 @@
     return 0;
 }
 
-static int zap_mmio_ranges(int xc_handle, u32 dom, unsigned long l2tab,
+static int zap_mmio_ranges(int xc_handle, uint32_t dom, unsigned long l2tab,
                            unsigned char e820_map_nr, unsigned char *e820map)
 {
     unsigned int i;
@@ -197,7 +197,7 @@
     return 0;
 }
 #else
-static int zap_mmio_range(int xc_handle, u32 dom,
+static int zap_mmio_range(int xc_handle, uint32_t dom,
                           l3_pgentry_t *vl3tab,
                           unsigned long mmio_range_start,
                           unsigned long mmio_range_size)
@@ -247,7 +247,7 @@
     return 0;
 }
 
-static int zap_mmio_ranges(int xc_handle, u32 dom, unsigned long l3tab,
+static int zap_mmio_ranges(int xc_handle, uint32_t dom, unsigned long l3tab,
                            unsigned char e820_map_nr, unsigned char *e820map)
 {
     unsigned int i;
@@ -271,7 +271,7 @@
 #endif
 
 static int setup_guest(int xc_handle,
-                       u32 dom, int memsize,
+                       uint32_t dom, int memsize,
                        char *image, unsigned long image_size,
                        unsigned long nr_pages,
                        vcpu_guest_context_t *ctxt,
@@ -595,7 +595,7 @@
 }
 
 int xc_vmx_build(int xc_handle,
-                 u32 domid,
+                 uint32_t domid,
                  int memsize,
                  const char *image_name,
                  unsigned int control_evtchn,
@@ -635,7 +635,7 @@
     op.cmd = DOM0_GETDOMAININFO;
     op.u.getdomaininfo.domain = (domid_t)domid;
     if ( (xc_dom0_op(xc_handle, &op) < 0) ||
-         ((u16)op.u.getdomaininfo.domain != domid) )
+         ((uint16_t)op.u.getdomaininfo.domain != domid) )
     {
         PERROR("Could not get info on domain");
         goto error_out;
@@ -790,7 +790,7 @@
 
 static int
 loadelfimage(
-    char *elfbase, int xch, u32 dom, unsigned long *parray,
+    char *elfbase, int xch, uint32_t dom, unsigned long *parray,
     struct domain_setup_info *dsi)
 {
     Elf32_Ehdr *ehdr = (Elf32_Ehdr *)elfbase;
diff -r 067b9aacb6c2 -r b3a255e88810 tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h     Wed Oct 12 09:11:35 2005
+++ b/tools/libxc/xenctrl.h     Wed Oct 12 10:07:37 2005
@@ -10,16 +10,6 @@
 #define XENCTRL_H
 
 #include <stdint.h>
-
-typedef uint8_t            u8;
-typedef uint16_t           u16;
-typedef uint32_t           u32;
-typedef uint64_t           u64;
-typedef int8_t             s8;
-typedef int16_t            s16;
-typedef int32_t            s32;
-typedef int64_t            s64;
-
 #include <sys/ptrace.h>
 #include <xen/xen.h>
 #include <xen/dom0_ops.h>
@@ -105,14 +95,14 @@
 long xc_ptrace(
     int xc_handle,
     enum __ptrace_request request, 
-    u32  domid,
+    uint32_t  domid,
     long addr, 
     long data);
 
 long xc_ptrace_core(
     int xc_handle,
     enum __ptrace_request request, 
-    u32 domid, 
+    uint32_t domid, 
     long addr, 
     long data);
 
@@ -133,28 +123,28 @@
  */
 
 typedef struct {
-    u32           domid;
-    u32           ssidref;
+    uint32_t           domid;
+    uint32_t           ssidref;
     unsigned int  dying:1, crashed:1, shutdown:1, 
                   paused:1, blocked:1, running:1;
     unsigned int  shutdown_reason; /* only meaningful if shutdown==1 */
     unsigned long nr_pages;
     unsigned long shared_info_frame;
-    u64           cpu_time;
+    uint64_t           cpu_time;
     unsigned long max_memkb;
     unsigned int  vcpus;
-    s32           vcpu_to_cpu[MAX_VIRT_CPUS];
+    int32_t           vcpu_to_cpu[MAX_VIRT_CPUS];
     cpumap_t      cpumap[MAX_VIRT_CPUS];
 } xc_dominfo_t;
 
 typedef dom0_getdomaininfo_t xc_domaininfo_t;
 int xc_domain_create(int xc_handle, 
-                     u32 ssidref,
-                     u32 *pdomid);
+                     uint32_t ssidref,
+                     uint32_t *pdomid);
 
 
 int xc_domain_dumpcore(int xc_handle, 
-                       u32 domid,
+                       uint32_t domid,
                        const char *corename);
 
 
@@ -167,7 +157,7 @@
  * @return 0 on success, -1 on failure.
  */
 int xc_domain_pause(int xc_handle, 
-                    u32 domid);
+                    uint32_t domid);
 /**
  * This function unpauses a domain.  The domain should have been previously
  * paused.
@@ -177,7 +167,7 @@
  * return 0 on success, -1 on failure
  */
 int xc_domain_unpause(int xc_handle, 
-                      u32 domid);
+                      uint32_t domid);
 
 /**
  * This function will destroy a domain.  Destroying a domain removes the domain
@@ -189,9 +179,9 @@
  * @return 0 on success, -1 on failure
  */
 int xc_domain_destroy(int xc_handle, 
-                      u32 domid);
+                      uint32_t domid);
 int xc_domain_pincpu(int xc_handle,
-                     u32 domid,
+                     uint32_t domid,
                      int vcpu,
                      cpumap_t *cpumap);
 /**
@@ -210,7 +200,7 @@
  * @return the number of domains enumerated or -1 on error
  */
 int xc_domain_getinfo(int xc_handle,
-                      u32 first_domid, 
+                      uint32_t first_domid, 
                       unsigned int max_doms,
                       xc_dominfo_t *info);
 
@@ -228,7 +218,7 @@
  * @return the number of domains enumerated or -1 on error
  */
 int xc_domain_getinfolist(int xc_handle,
-                          u32 first_domain,
+                          uint32_t first_domain,
                           unsigned int max_domains,
                           xc_domaininfo_t *info);
 
@@ -244,12 +234,12 @@
  * @return 0 on success, -1 on failure
  */
 int xc_domain_get_vcpu_context(int xc_handle,
-                               u32 domid,
-                               u32 vcpu,
+                               uint32_t domid,
+                               uint32_t vcpu,
                                vcpu_guest_context_t *ctxt);
 
 int xc_domain_setcpuweight(int xc_handle,
-                           u32 domid,
+                           uint32_t domid,
                            float weight);
 long long xc_domain_get_cpu_usage(int xc_handle,
                                   domid_t domid,
@@ -258,7 +248,7 @@
 
 typedef dom0_shadow_control_stats_t xc_shadow_control_stats_t;
 int xc_shadow_control(int xc_handle,
-                      u32 domid, 
+                      uint32_t domid, 
                       unsigned int sop,
                       unsigned long *dirty_bitmap,
                       unsigned long pages,
@@ -268,10 +258,10 @@
                            unsigned long ctx_allow);
 
 int xc_bvtsched_domain_set(int xc_handle,
-                           u32 domid,
-                           u32 mcuadv,
+                           uint32_t domid,
+                           uint32_t mcuadv,
                            int warpback,
-                           s32 warpvalue,
+                           int32_t warpvalue,
                            long long warpl,
                            long long warpu);
 
@@ -279,20 +269,24 @@
                            unsigned long *ctx_allow);
 
 int xc_bvtsched_domain_get(int xc_handle,
-                           u32 domid,
-                           u32 *mcuadv,
+                           uint32_t domid,
+                           uint32_t *mcuadv,
                            int *warpback,
-                           s32 *warpvalue,
+                           int32_t *warpvalue,
                            long long *warpl,
                            long long *warpu);
 
 int xc_sedf_domain_set(int xc_handle,
-                          u32 domid,
-                          u64 period, u64 slice, u64 latency, u16 extratime, 
u16 weight);
+                       uint32_t domid,
+                       uint64_t period, uint64_t slice,
+                       uint64_t latency, uint16_t extratime,
+                       uint16_t weight);
 
 int xc_sedf_domain_get(int xc_handle,
-                          u32 domid,
-                          u64* period, u64 *slice, u64 *latency, u16 
*extratime, u16* weight);
+                       uint32_t domid,
+                       uint64_t* period, uint64_t *slice,
+                       uint64_t *latency, uint16_t *extratime,
+                       uint16_t *weight);
 
 typedef evtchn_status_t xc_evtchn_status_t;
 
@@ -311,16 +305,16 @@
  * @return allocated port (in @dom) on success, -1 on failure
  */
 int xc_evtchn_alloc_unbound(int xc_handle,
-                            u32 dom,
-                            u32 remote_dom);
+                            uint32_t dom,
+                            uint32_t remote_dom);
 
 int xc_evtchn_status(int xc_handle,
-                     u32 dom, /* may be DOMID_SELF */
+                     uint32_t dom, /* may be DOMID_SELF */
                      int port,
                      xc_evtchn_status_t *status);
 
 int xc_physdev_pci_access_modify(int xc_handle,
-                                 u32 domid,
+                                 uint32_t domid,
                                  int bus,
                                  int dev,
                                  int func,
@@ -339,29 +333,29 @@
                 int *sched_id);
 
 int xc_domain_setmaxmem(int xc_handle,
-                        u32 domid, 
+                        uint32_t domid, 
                         unsigned int max_memkb);
 
 int xc_domain_memory_increase_reservation(int xc_handle,
-                                          u32 domid, 
+                                          uint32_t domid, 
                                           unsigned long nr_extents,
                                           unsigned int extent_order,
                                           unsigned int address_bits,
                                          unsigned long *extent_start);
 
 int xc_domain_memory_decrease_reservation(int xc_handle,
-                                          u32 domid, 
+                                          uint32_t domid, 
                                           unsigned long nr_extents,
                                           unsigned int extent_order,
                                          unsigned long *extent_start);
 
-unsigned long xc_make_page_below_4G(int xc_handle, u32 domid, 
+unsigned long xc_make_page_below_4G(int xc_handle, uint32_t domid, 
                                    unsigned long mfn);
 
 typedef dom0_perfc_desc_t xc_perfc_desc_t;
 /* IMPORTANT: The caller is responsible for mlock()'ing the @desc array. */
 int xc_perfc_control(int xc_handle,
-                     u32 op,
+                     uint32_t op,
                      xc_perfc_desc_t *desc);
 
 /* read/write msr */
@@ -384,27 +378,29 @@
  * @parm prot same flag as in mmap().
  * @parm mfn the frame address to map.
  */
-void *xc_map_foreign_range(int xc_handle, u32 dom,
+void *xc_map_foreign_range(int xc_handle, uint32_t dom,
                             int size, int prot,
                             unsigned long mfn );
 
-void *xc_map_foreign_batch(int xc_handle, u32 dom, int prot,
+void *xc_map_foreign_batch(int xc_handle, uint32_t dom, int prot,
                            unsigned long *arr, int num );
 
-int xc_get_pfn_list(int xc_handle, u32 domid, unsigned long *pfn_buf, 
+int xc_get_pfn_list(int xc_handle, uint32_t domid, unsigned long *pfn_buf, 
                     unsigned long max_pfns);
 
-int xc_ia64_get_pfn_list(int xc_handle, u32 domid, unsigned long *pfn_buf, 
-                    unsigned int start_page, unsigned int nr_pages);
-
-long xc_get_max_pages(int xc_handle, u32 domid);
+int xc_ia64_get_pfn_list(int xc_handle, uint32_t domid,
+                         unsigned long *pfn_buf, 
+                         unsigned int start_page, unsigned int nr_pages);
+
+long xc_get_max_pages(int xc_handle, uint32_t domid);
 
 int xc_mmuext_op(int xc_handle, struct mmuext_op *op, unsigned int nr_ops,
                 domid_t dom);
 
 int xc_memory_op(int xc_handle, int cmd, void *arg);
 
-int xc_get_pfn_type_batch(int xc_handle, u32 dom, int num, unsigned long *arr);
+int xc_get_pfn_type_batch(int xc_handle, uint32_t dom,
+                          int num, unsigned long *arr);
 
 
 /*\
@@ -438,33 +434,33 @@
  */
 int xc_grant_interface_close(int xc_handle);
 
-int xc_gnttab_map_grant_ref(int  xc_handle,
-                            u64  host_virt_addr,
-                            u32  dom,
-                            u16  ref,
-                            u16  flags,
-                            s16 *handle,
-                            u64 *dev_bus_addr);
+int xc_gnttab_map_grant_ref(int      xc_handle,
+                            uint64_t host_virt_addr,
+                            uint32_t dom,
+                            uint16_t ref,
+                            uint16_t flags,
+                            int16_t *handle,
+                            uint64_t *dev_bus_addr);
 
 int xc_gnttab_unmap_grant_ref(int  xc_handle,
-                              u64  host_virt_addr,
-                              u64  dev_bus_addr,
-                              u16  handle,
-                              s16 *status);
+                              uint64_t  host_virt_addr,
+                              uint64_t  dev_bus_addr,
+                              uint16_t  handle,
+                              int16_t *status);
 
 int xc_gnttab_setup_table(int        xc_handle,
-                          u32        dom,
-                          u16        nr_frames,
-                          s16       *status,
+                          uint32_t   dom,
+                          uint16_t   nr_frames,
+                          int16_t   *status,
                           unsigned long **frame_list);
 
 /* Grant debug builds only: */
 int xc_gnttab_dump_table(int        xc_handle,
-                         u32        dom,
-                         s16       *status);
+                         uint32_t   dom,
+                         int16_t   *status);
 
 /* Get current total pages allocated to a domain. */
-long xc_get_tot_pages(int xc_handle, u32 domid);
+long xc_get_tot_pages(int xc_handle, uint32_t domid);
 
 /* Execute a privileged dom0 operation. */
 int xc_dom0_op(int xc_handle, dom0_op_t *op);
diff -r 067b9aacb6c2 -r b3a255e88810 tools/libxc/xg_private.h
--- a/tools/libxc/xg_private.h  Wed Oct 12 09:11:35 2005
+++ b/tools/libxc/xg_private.h  Wed Oct 12 10:07:37 2005
@@ -60,11 +60,11 @@
 #define PAGE_SIZE               (1UL << PAGE_SHIFT)
 #define PAGE_MASK               (~(PAGE_SIZE-1))
 
-typedef u32 l1_pgentry_32_t;
-typedef u32 l2_pgentry_32_t;
-typedef u64 l1_pgentry_64_t;
-typedef u64 l2_pgentry_64_t;
-typedef u64 l3_pgentry_64_t;
+typedef uint32_t l1_pgentry_32_t;
+typedef uint32_t l2_pgentry_32_t;
+typedef uint64_t l1_pgentry_64_t;
+typedef uint64_t l2_pgentry_64_t;
+typedef uint64_t l3_pgentry_64_t;
 typedef unsigned long l1_pgentry_t;
 typedef unsigned long l2_pgentry_t;
 #if defined(__x86_64__)
@@ -129,7 +129,7 @@
 typedef int (*parseimagefunc)(char *image, unsigned long image_size,
                              struct domain_setup_info *dsi);
 typedef int (*loadimagefunc)(char *image, unsigned long image_size, int xch,
-                            u32 dom, unsigned long *parray,
+                            uint32_t dom, unsigned long *parray,
                             struct domain_setup_info *dsi);
 
 struct load_funcs
@@ -153,13 +153,13 @@
 
 unsigned long xc_get_m2p_start_mfn (int xc_handle);
 
-int xc_copy_to_domain_page(int xc_handle, u32 domid,
+int xc_copy_to_domain_page(int xc_handle, uint32_t domid,
                             unsigned long dst_pfn, void *src_page);
 
 unsigned long xc_get_filesz(int fd);
 
 void xc_map_memcpy(unsigned long dst, char *src, unsigned long size,
-                   int xch, u32 dom, unsigned long *parray,
+                   int xch, uint32_t dom, unsigned long *parray,
                    unsigned long vstart);
 
 int pin_table(int xc_handle, unsigned int type, unsigned long mfn,
diff -r 067b9aacb6c2 -r b3a255e88810 tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Wed Oct 12 09:11:35 2005
+++ b/tools/python/xen/lowlevel/xc/xc.c Wed Oct 12 10:07:37 2005
@@ -42,7 +42,7 @@
 {
     XcObject *xc = (XcObject *)self;
 
-    u32 dom;
+    uint32_t dom;
     char *corefile;
 
     static char *kwd_list[] = { "dom", "corefile", NULL };
@@ -77,9 +77,9 @@
 {
     XcObject *xc = (XcObject *)self;
 
-    u32          dom = 0;
+    uint32_t          dom = 0;
     int          ret;
-    u32          ssidref = 0x0;
+    uint32_t          ssidref = 0x0;
 
     static char *kwd_list[] = { "dom", "ssidref", NULL };
 
@@ -99,7 +99,7 @@
 {
     XcObject *xc = (XcObject *)self;
 
-    u32 dom;
+    uint32_t dom;
 
     static char *kwd_list[] = { "dom", NULL };
 
@@ -119,7 +119,7 @@
 {
     XcObject *xc = (XcObject *)self;
 
-    u32 dom;
+    uint32_t dom;
 
     static char *kwd_list[] = { "dom", NULL };
 
@@ -139,7 +139,7 @@
 {
     XcObject *xc = (XcObject *)self;
 
-    u32 dom;
+    uint32_t dom;
 
     static char *kwd_list[] = { "dom", NULL };
 
@@ -159,7 +159,7 @@
 {
     XcObject *xc = (XcObject *)self;
 
-    u32 dom;
+    uint32_t dom;
     int vcpu = 0;
     cpumap_t cpumap = 0xFFFFFFFF;
 
@@ -182,7 +182,7 @@
 {
     XcObject *xc = (XcObject *)self;
 
-    u32 dom;
+    uint32_t dom;
     float cpuweight = 1;
 
     static char *kwd_list[] = { "dom", "cpuweight", NULL };
@@ -205,7 +205,7 @@
     XcObject *xc = (XcObject *)self;
     PyObject *list, *vcpu_list, *cpumap_list, *info_dict;
 
-    u32 first_dom = 0;
+    uint32_t first_dom = 0;
     int max_doms = 1024, nr_doms, i, j;
     xc_dominfo_t *info;
 
@@ -270,7 +270,7 @@
 {
     XcObject *xc = (XcObject *)self;
 
-    u32 dom;
+    uint32_t dom;
     char *image, *ramdisk = NULL, *cmdline = "";
     int flags = 0, vcpus = 1;
     int store_evtchn, console_evtchn;
@@ -308,7 +308,7 @@
 {
     XcObject *xc = (XcObject *)self;
 
-    u32   dom;
+    uint32_t   dom;
     char *image;
     int   control_evtchn, store_evtchn;
     int flags = 0, vcpus = 1;
@@ -373,10 +373,10 @@
 {
     XcObject *xc = (XcObject *)self;
 
-    u32 dom;
-    u32 mcuadv;
+    uint32_t dom;
+    uint32_t mcuadv;
     int warpback; 
-    s32 warpvalue;
+    int32_t warpvalue;
     long long warpl;
     long long warpu;
 
@@ -401,10 +401,10 @@
                                           PyObject *kwds)
 {
     XcObject *xc = (XcObject *)self;
-    u32 dom;
-    u32 mcuadv;
+    uint32_t dom;
+    uint32_t mcuadv;
     int warpback; 
-    s32 warpvalue;
+    int32_t warpvalue;
     long long warpl;
     long long warpu;
     
@@ -432,7 +432,7 @@
 {
     XcObject *xc = (XcObject *)self;
 
-    u32 dom, remote_dom;
+    uint32_t dom, remote_dom;
     int port;
 
     static char *kwd_list[] = { "dom", "remote_dom", NULL };
@@ -454,7 +454,7 @@
     XcObject *xc = (XcObject *)self;
     PyObject *dict;
 
-    u32 dom = DOMID_SELF;
+    uint32_t dom = DOMID_SELF;
     int port, ret;
     xc_evtchn_status_t status;
 
@@ -507,7 +507,7 @@
                                                 PyObject *kwds)
 {
     XcObject *xc = (XcObject *)self;
-    u32 dom;
+    uint32_t dom;
     int bus, dev, func, enable, ret;
 
     static char *kwd_list[] = { "dom", "bus", "dev", "func", "enable", NULL };
@@ -635,9 +635,9 @@
                                          PyObject *kwds)
 {
     XcObject *xc = (XcObject *)self;
-    u32 domid;
-    u64 period, slice, latency;
-    u16 extratime, weight;
+    uint32_t domid;
+    uint64_t period, slice, latency;
+    uint16_t extratime, weight;
     static char *kwd_list[] = { "dom", "period", "slice",
                                 "latency", "extratime", "weight",NULL };
     
@@ -658,9 +658,9 @@
                                          PyObject *kwds)
 {
     XcObject *xc = (XcObject *)self;
-    u32 domid;
-    u64 period, slice,latency;
-    u16 weight, extratime;
+    uint32_t domid;
+    uint64_t period, slice,latency;
+    uint16_t weight, extratime;
     
     static char *kwd_list[] = { "dom", NULL };
 
@@ -685,7 +685,7 @@
 {
     XcObject *xc = (XcObject *)self;
 
-    u32 dom;
+    uint32_t dom;
     int op=0;
 
     static char *kwd_list[] = { "dom", "op", NULL };
@@ -707,7 +707,7 @@
 {
     XcObject *xc = (XcObject *)self;
 
-    u32 dom;
+    uint32_t dom;
     unsigned int maxmem_kb;
 
     static char *kwd_list[] = { "dom", "maxmem_kb", NULL };
@@ -729,7 +729,7 @@
 {
     XcObject *xc = (XcObject *)self;
 
-    u32 dom;
+    uint32_t dom;
     unsigned long mem_kb;
     unsigned int extent_order = 0 , address_bits = 0;
     unsigned long nr_extents;
diff -r 067b9aacb6c2 -r b3a255e88810 tools/python/xen/lowlevel/xs/xs.c
--- a/tools/python/xen/lowlevel/xs/xs.c Wed Oct 12 09:11:35 2005
+++ b/tools/python/xen/lowlevel/xs/xs.c Wed Oct 12 10:07:37 2005
@@ -28,6 +28,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 
+#include <xenctrl.h>
 #include "xs.h"
 
 /** @file
diff -r 067b9aacb6c2 -r b3a255e88810 tools/security/Makefile
--- a/tools/security/Makefile   Wed Oct 12 09:11:35 2005
+++ b/tools/security/Makefile   Wed Oct 12 10:07:37 2005
@@ -47,10 +47,10 @@
        chmod 700 ./updategrub.sh
        chmod 700 ./getlabel.sh
 
-secpol_tool : secpol_tool.c secpol_compat.h
+secpol_tool : secpol_tool.c
        $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $<
 
-secpol_xml2bin : secpol_xml2bin.c secpol_xml2bin.h secpol_compat.h
+secpol_xml2bin : secpol_xml2bin.c secpol_xml2bin.h
        $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_XML2BIN) $(VALIDATE_SCHEMA) -o $@ 
$<
 
 clean:
diff -r 067b9aacb6c2 -r b3a255e88810 tools/security/secpol_tool.c
--- a/tools/security/secpol_tool.c      Wed Oct 12 09:11:35 2005
+++ b/tools/security/secpol_tool.c      Wed Oct 12 10:07:37 2005
@@ -33,7 +33,7 @@
 #include <sys/ioctl.h>
 #include <string.h>
 #include <netinet/in.h>
-#include "secpol_compat.h"
+#include <stdint.h>
 #include <xen/acm.h>
 #include <xen/acm_ops.h>
 #include <xen/linux/privcmd.h>
diff -r 067b9aacb6c2 -r b3a255e88810 tools/security/secpol_xml2bin.c
--- a/tools/security/secpol_xml2bin.c   Wed Oct 12 09:11:35 2005
+++ b/tools/security/secpol_xml2bin.c   Wed Oct 12 10:07:37 2005
@@ -37,7 +37,7 @@
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 #include <libxml/xmlreader.h>
-#include "secpol_compat.h"
+#include <stdint.h>
 #include <xen/acm.h>
 
 #include "secpol_xml2bin.h"
diff -r 067b9aacb6c2 -r b3a255e88810 
tools/xenstat/libxenstat/src/xen-interface.h
--- a/tools/xenstat/libxenstat/src/xen-interface.h      Wed Oct 12 09:11:35 2005
+++ b/tools/xenstat/libxenstat/src/xen-interface.h      Wed Oct 12 10:07:37 2005
@@ -16,16 +16,6 @@
  */
 
 #include <stdint.h>
-
-typedef int8_t   s8;
-typedef int16_t  s16;
-typedef int32_t  s32;
-typedef int64_t  s64;
-typedef uint8_t  u8;
-typedef uint16_t u16;
-typedef uint32_t u32;
-typedef uint64_t u64;
-
 #include <xen/xen.h>
 #include <xen/dom0_ops.h>
 #include <xen/sched.h>
diff -r 067b9aacb6c2 -r b3a255e88810 tools/xenstore/fake_libxc.c
--- a/tools/xenstore/fake_libxc.c       Wed Oct 12 09:11:35 2005
+++ b/tools/xenstore/fake_libxc.c       Wed Oct 12 10:07:37 2005
@@ -30,10 +30,11 @@
 #include "xenstored_core.h"
 #include "xenstored_domain.h"
 #include "xenstored_test.h"
+#include <xenctrl.h>
 
 static int sigfd;
 static int xs_test_pid;
-static u16 port;
+static uint16_t port;
 
 /* The event channel maps to a signal, shared page to an mmapped file. */
 void evtchn_notify(int local_port)
@@ -43,7 +44,7 @@
                barf_perror("fake event channel failed");
 }
 
-void *xc_map_foreign_range(int xc_handle, u32 dom __attribute__((unused)),
+void *xc_map_foreign_range(int xc_handle, uint32_t dom __attribute__((unused)),
                           int size, int prot,
                           unsigned long mfn __attribute__((unused)))
 {
@@ -83,7 +84,7 @@
 }
 
 int xc_domain_getinfo(int xc_handle __attribute__((unused)),
-                     u32 first_domid, unsigned int max_doms,
+                     uint32_t first_domid, unsigned int max_doms,
                       xc_dominfo_t *info)
 {
        assert(max_doms == 1);
diff -r 067b9aacb6c2 -r b3a255e88810 tools/xenstore/tdb.c
--- a/tools/xenstore/tdb.c      Wed Oct 12 09:11:35 2005
+++ b/tools/xenstore/tdb.c      Wed Oct 12 10:07:37 2005
@@ -154,9 +154,9 @@
 }
 
 /* Endian conversion: we only ever deal with 4 byte quantities */
-static void *convert(void *buf, u32 size)
-{
-       u32 i, *p = buf;
+static void *convert(void *buf, uint32_t size)
+{
+       uint32_t i, *p = buf;
        for (i = 0; i < size / 4; i++)
                p[i] = TDB_BYTEREV(p[i]);
        return buf;
@@ -171,8 +171,8 @@
        tdb_len rec_len; /* total byte length of record */
        tdb_len key_len; /* byte length of key */
        tdb_len data_len; /* byte length of data */
-       u32 full_hash; /* the full 32 bit hash of the key */
-       u32 magic;   /* try to catch errors */
+       uint32_t full_hash; /* the full 32 bit hash of the key */
+       uint32_t magic;   /* try to catch errors */
        /* the following union is implied:
                union {
                        char record[rec_len];
@@ -180,7 +180,7 @@
                                char key[key_len];
                                char data[data_len];
                        }
-                       u32 totalsize; (tailer)
+                       uint32_t totalsize; (tailer)
                }
        */
 };
@@ -294,10 +294,10 @@
 }
 
 /* This is based on the hash algorithm from gdbm */
-static u32 default_tdb_hash(TDB_DATA *key)
-{
-       u32 value;      /* Used to compute the hash value.  */
-       u32   i;        /* Used to cycle through random values. */
+static uint32_t default_tdb_hash(TDB_DATA *key)
+{
+       uint32_t value; /* Used to compute the hash value.  */
+       uint32_t   i;   /* Used to cycle through random values. */
 
        /* Set the initial value from the key size. */
        for (value = 0x238F13AF * key->dsize, i=0; i < key->dsize; i++)
@@ -399,7 +399,7 @@
 static int tdb_key_eq(TDB_CONTEXT *tdb, tdb_off off, TDB_DATA key)
 {
        char buf[64];
-       u32 len;
+       uint32_t len;
 
        if (tdb_oob(tdb, off + key.dsize, 0) != 0)
                return -1;
@@ -1030,7 +1030,7 @@
 
 /* Returns 0 on fail.  On success, return offset of record, and fills
    in rec */
-static tdb_off tdb_find(TDB_CONTEXT *tdb, TDB_DATA key, u32 hash,
+static tdb_off tdb_find(TDB_CONTEXT *tdb, TDB_DATA key, uint32_t hash,
                        struct list_struct *r)
 {
        tdb_off rec_ptr;
@@ -1058,10 +1058,10 @@
 }
 
 /* As tdb_find, but if you succeed, keep the lock */
-static tdb_off tdb_find_lock_hash(TDB_CONTEXT *tdb, TDB_DATA key, u32 hash, 
int locktype,
+static tdb_off tdb_find_lock_hash(TDB_CONTEXT *tdb, TDB_DATA key, uint32_t 
hash, int locktype,
                             struct list_struct *rec)
 {
-       u32 rec_ptr;
+       uint32_t rec_ptr;
 
        if (tdb_lock(tdb, BUCKET(hash), locktype) == -1)
                return 0;
@@ -1089,7 +1089,7 @@
 /* Error string for the last tdb error */
 const char *tdb_errorstr(TDB_CONTEXT *tdb)
 {
-       u32 i;
+       uint32_t i;
        for (i = 0; i < sizeof(emap) / sizeof(struct tdb_errname); i++)
                if (tdb->ecode == emap[i].ecode)
                        return emap[i].estring;
@@ -1101,7 +1101,7 @@
    on failure return -1.
 */
 
-static int tdb_update_hash(TDB_CONTEXT *tdb, TDB_DATA key, u32 hash, TDB_DATA 
dbuf)
+static int tdb_update_hash(TDB_CONTEXT *tdb, TDB_DATA key, uint32_t hash, 
TDB_DATA dbuf)
 {
        struct list_struct rec;
        tdb_off rec_ptr;
@@ -1141,7 +1141,7 @@
        tdb_off rec_ptr;
        struct list_struct rec;
        TDB_DATA ret;
-       u32 hash;
+       uint32_t hash;
 
        /* find which hash bucket it is in */
        hash = tdb->hash_fn(&key);
@@ -1161,7 +1161,7 @@
    this doesn't match the conventions in the rest of this module, but is
    compatible with gdbm
 */
-static int tdb_exists_hash(TDB_CONTEXT *tdb, TDB_DATA key, u32 hash)
+static int tdb_exists_hash(TDB_CONTEXT *tdb, TDB_DATA key, uint32_t hash)
 {
        struct list_struct rec;
        
@@ -1173,7 +1173,7 @@
 
 int tdb_exists(TDB_CONTEXT *tdb, TDB_DATA key)
 {
-       u32 hash = tdb->hash_fn(&key);
+       uint32_t hash = tdb->hash_fn(&key);
        return tdb_exists_hash(tdb, key, hash);
 }
 
@@ -1210,7 +1210,7 @@
 static int unlock_record(TDB_CONTEXT *tdb, tdb_off off)
 {
        struct tdb_traverse_lock *i;
-       u32 count = 0;
+       uint32_t count = 0;
 
        if (off == 0)
                return 0;
@@ -1293,10 +1293,10 @@
                   system (testing using ldbtest).
                 */
                if (!tlock->off && tlock->hash != 0) {
-                       u32 off;
+                       uint32_t off;
                        if (tdb->map_ptr) {
                                for (;tlock->hash < 
tdb->header.hash_size;tlock->hash++) {
-                                       if (0 != *(u32 
*)(TDB_HASH_TOP(tlock->hash) + (unsigned char *)tdb->map_ptr)) {
+                                       if (0 != *(uint32_t 
*)(TDB_HASH_TOP(tlock->hash) + (unsigned char *)tdb->map_ptr)) {
                                                break;
                                        }
                                }
@@ -1459,7 +1459,7 @@
 /* find the next entry in the database, returning its key */
 TDB_DATA tdb_nextkey(TDB_CONTEXT *tdb, TDB_DATA oldkey)
 {
-       u32 oldhash;
+       uint32_t oldhash;
        TDB_DATA key = tdb_null;
        struct list_struct rec;
        char *k = NULL;
@@ -1513,7 +1513,7 @@
 }
 
 /* delete an entry in the database given a key */
-static int tdb_delete_hash(TDB_CONTEXT *tdb, TDB_DATA key, u32 hash)
+static int tdb_delete_hash(TDB_CONTEXT *tdb, TDB_DATA key, uint32_t hash)
 {
        tdb_off rec_ptr;
        struct list_struct rec;
@@ -1529,7 +1529,7 @@
 
 int tdb_delete(TDB_CONTEXT *tdb, TDB_DATA key)
 {
-       u32 hash = tdb->hash_fn(&key);
+       uint32_t hash = tdb->hash_fn(&key);
        return tdb_delete_hash(tdb, key, hash);
 }
 
@@ -1541,7 +1541,7 @@
 int tdb_store(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, int flag)
 {
        struct list_struct rec;
-       u32 hash;
+       uint32_t hash;
        tdb_off rec_ptr;
        char *p = NULL;
        int ret = 0;
@@ -1622,7 +1622,7 @@
    is <= the old data size and the key exists.
    on failure return -1. Record must be locked before calling.
 */
-static int tdb_append_inplace(TDB_CONTEXT *tdb, TDB_DATA key, u32 hash, 
TDB_DATA new_dbuf)
+static int tdb_append_inplace(TDB_CONTEXT *tdb, TDB_DATA key, uint32_t hash, 
TDB_DATA new_dbuf)
 {
        struct list_struct rec;
        tdb_off rec_ptr;
@@ -1656,7 +1656,7 @@
 int tdb_append(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA new_dbuf)
 {
        struct list_struct rec;
-       u32 hash;
+       uint32_t hash;
        tdb_off rec_ptr;
        char *p = NULL;
        int ret = 0;
@@ -1790,7 +1790,7 @@
        struct stat st;
        int rev = 0, locked = 0;
        uint8_t *vp;
-       u32 vertest;
+       uint32_t vertest;
 
        if (!(tdb = talloc_zero(name, TDB_CONTEXT))) {
                /* Can't log this */
@@ -1869,8 +1869,8 @@
                rev = (tdb->flags & TDB_CONVERT);
        }
        vp = (uint8_t *)&tdb->header.version;
-       vertest = (((u32)vp[0]) << 24) | (((u32)vp[1]) << 16) |
-                 (((u32)vp[2]) << 8) | (u32)vp[3];
+       vertest = (((uint32_t)vp[0]) << 24) | (((uint32_t)vp[1]) << 16) |
+                 (((uint32_t)vp[2]) << 8) | (uint32_t)vp[3];
        tdb->flags |= (vertest==TDB_VERSION) ? TDB_BIGENDIAN : 0;
        if (!rev)
                tdb->flags &= ~TDB_CONVERT;
@@ -2000,7 +2000,7 @@
 /* lock/unlock entire database */
 int tdb_lockall(TDB_CONTEXT *tdb)
 {
-       u32 i;
+       uint32_t i;
 
        /* There are no locks on read-only dbs */
        if (tdb->read_only)
@@ -2011,7 +2011,7 @@
 
        /* If error, release locks we have... */
        if (i < tdb->header.hash_size) {
-               u32 j;
+               uint32_t j;
 
                for ( j = 0; j < i; j++)
                        tdb_unlock(tdb, j, F_WRLCK);
@@ -2022,7 +2022,7 @@
 }
 void tdb_unlockall(TDB_CONTEXT *tdb)
 {
-       u32 i;
+       uint32_t i;
        for (i=0; i < tdb->header.hash_size; i++)
                tdb_unlock(tdb, i, F_WRLCK);
 }
diff -r 067b9aacb6c2 -r b3a255e88810 tools/xenstore/tdb.h
--- a/tools/xenstore/tdb.h      Wed Oct 12 09:11:35 2005
+++ b/tools/xenstore/tdb.h      Wed Oct 12 10:07:37 2005
@@ -53,8 +53,8 @@
                TDB_ERR_OOM, TDB_ERR_EXISTS, TDB_ERR_NOLOCK, 
TDB_ERR_LOCK_TIMEOUT,
                TDB_ERR_NOEXIST};
 
-#ifndef u32
-#define u32 unsigned
+#ifndef uint32_t
+#define uint32_t unsigned
 #endif
 
 typedef struct TDB_DATA {
@@ -62,27 +62,27 @@
        size_t dsize;
 } TDB_DATA;
 
-typedef u32 tdb_len;
-typedef u32 tdb_off;
+typedef uint32_t tdb_len;
+typedef uint32_t tdb_off;
 
 /* this is stored at the front of every database */
 struct tdb_header {
        char magic_food[32]; /* for /etc/magic */
-       u32 version; /* version of the code */
-       u32 hash_size; /* number of hash entries */
+       uint32_t version; /* version of the code */
+       uint32_t hash_size; /* number of hash entries */
        tdb_off rwlocks;
        tdb_off reserved[31];
 };
 
 struct tdb_lock_type {
-       u32 count;
-       u32 ltype;
+       uint32_t count;
+       uint32_t ltype;
 };
 
 struct tdb_traverse_lock {
        struct tdb_traverse_lock *next;
-       u32 off;
-       u32 hash;
+       uint32_t off;
+       uint32_t hash;
 };
 
 #ifndef PRINTF_ATTRIBUTE
@@ -99,19 +99,19 @@
        struct tdb_lock_type *locked; /* array of chain locks */
        enum TDB_ERROR ecode; /* error code for last tdb error */
        struct tdb_header header; /* a cached copy of the header */
-       u32 flags; /* the flags passed to tdb_open */
+       uint32_t flags; /* the flags passed to tdb_open */
        struct tdb_traverse_lock travlocks; /* current traversal locks */
        struct tdb_context *next; /* all tdbs to avoid multiple opens */
        dev_t device;   /* uniquely identifies this tdb */
        ino_t inode;    /* uniquely identifies this tdb */
        void (*log_fn)(struct tdb_context *tdb, int level, const char *, ...) 
PRINTF_ATTRIBUTE(3,4); /* logging function */
-       u32 (*hash_fn)(TDB_DATA *key);
+       uint32_t (*hash_fn)(TDB_DATA *key);
        int open_flags; /* flags used in the open - needed by reopen */
 } TDB_CONTEXT;
 
 typedef int (*tdb_traverse_func)(TDB_CONTEXT *, TDB_DATA, TDB_DATA, void *);
 typedef void (*tdb_log_func)(TDB_CONTEXT *, int , const char *, ...);
-typedef u32 (*tdb_hash_func)(TDB_DATA *key);
+typedef uint32_t (*tdb_hash_func)(TDB_DATA *key);
 
 TDB_CONTEXT *tdb_open(const char *name, int hash_size, int tdb_flags,
                      int open_flags, mode_t mode);
diff -r 067b9aacb6c2 -r b3a255e88810 tools/xenstore/xenstored_core.c
--- a/tools/xenstore/xenstored_core.c   Wed Oct 12 09:11:35 2005
+++ b/tools/xenstore/xenstored_core.c   Wed Oct 12 10:07:37 2005
@@ -378,7 +378,7 @@
 static struct node *read_node(struct connection *conn, const char *name)
 {
        TDB_DATA key, data;
-       u32 *p;
+       uint32_t *p;
        struct node *node;
 
        key.dptr = (void *)name;
@@ -400,7 +400,7 @@
        talloc_steal(node, data.dptr);
 
        /* Datalen, childlen, number of permissions */
-       p = (u32 *)data.dptr;
+       p = (uint32_t *)data.dptr;
        node->num_perms = p[0];
        node->datalen = p[1];
        node->childlen = p[2];
@@ -423,14 +423,14 @@
        key.dptr = (void *)node->name;
        key.dsize = strlen(node->name);
 
-       data.dsize = 3*sizeof(u32)
+       data.dsize = 3*sizeof(uint32_t)
                + node->num_perms*sizeof(node->perms[0])
                + node->datalen + node->childlen;
        data.dptr = talloc_size(node, data.dsize);
-       ((u32 *)data.dptr)[0] = node->num_perms;
-       ((u32 *)data.dptr)[1] = node->datalen;
-       ((u32 *)data.dptr)[2] = node->childlen;
-       p = data.dptr + 3 * sizeof(u32);
+       ((uint32_t *)data.dptr)[0] = node->num_perms;
+       ((uint32_t *)data.dptr)[1] = node->datalen;
+       ((uint32_t *)data.dptr)[2] = node->childlen;
+       p = data.dptr + 3 * sizeof(uint32_t);
 
        memcpy(p, node->perms, node->num_perms*sizeof(node->perms[0]));
        p += node->num_perms*sizeof(node->perms[0]);
@@ -668,7 +668,7 @@
 {
        unsigned int i;
        char *strings = NULL;
-       char buffer[MAX_STRLEN(domid_t) + 1];
+       char buffer[MAX_STRLEN(unsigned int) + 1];
 
        for (*len = 0, i = 0; i < num; i++) {
                if (!xs_perm_to_string(&perms[i], buffer))
diff -r 067b9aacb6c2 -r b3a255e88810 tools/xenstore/xenstored_core.h
--- a/tools/xenstore/xenstored_core.h   Wed Oct 12 09:11:35 2005
+++ b/tools/xenstore/xenstored_core.h   Wed Oct 12 10:07:37 2005
@@ -60,7 +60,7 @@
        int fd;
 
        /* Who am I? 0 for socket connections. */
-       domid_t id;
+       unsigned int id;
 
        /* Is this a read-only connection? */
        bool can_write;
@@ -76,7 +76,7 @@
 
        /* List of in-progress transactions. */
        struct list_head transaction_list;
-       u32 next_transaction_id;
+       uint32_t next_transaction_id;
 
        /* The domain I'm associated with, if any. */
        struct domain *domain;
diff -r 067b9aacb6c2 -r b3a255e88810 tools/xenstore/xenstored_domain.c
--- a/tools/xenstore/xenstored_domain.c Wed Oct 12 09:11:35 2005
+++ b/tools/xenstore/xenstored_domain.c Wed Oct 12 10:07:37 2005
@@ -36,6 +36,7 @@
 #include "xenstored_watch.h"
 #include "xenstored_test.h"
 
+#include <xenctrl.h>
 #include <xen/linux/evtchn.h>
 
 static int *xc_handle;
@@ -48,14 +49,14 @@
        struct list_head list;
 
        /* The id of this domain */
-       domid_t domid;
+       unsigned int domid;
 
        /* Event channel port */
-       u16 port;
+       uint16_t port;
 
        /* The remote end of the event channel, used only to validate
           repeated domain introductions. */
-       u16 remote_port;
+       uint16_t remote_port;
 
        /* The mfn associated with the event channel, used only to validate
           repeated domain introductions. */
@@ -81,9 +82,9 @@
 
 struct ringbuf_head
 {
-       u32 write; /* Next place to write to */
-       u32 read; /* Next place to read from */
-       u8 flags;
+       uint32_t write; /* Next place to write to */
+       uint32_t read; /* Next place to read from */
+       uint8_t flags;
        char buf[0];
 } __attribute__((packed));
 
@@ -106,9 +107,9 @@
 
 /* We can't fill last byte: would look like empty buffer. */
 static void *get_output_chunk(const struct ringbuf_head *h,
-                             void *buf, u32 *len)
-{
-       u32 read_mark;
+                             void *buf, uint32_t *len)
+{
+       uint32_t read_mark;
 
        if (h->read == 0)
                read_mark = ringbuf_datasize - 1;
@@ -123,7 +124,7 @@
 }
 
 static const void *get_input_chunk(const struct ringbuf_head *h,
-                                  const void *buf, u32 *len)
+                                  const void *buf, uint32_t *len)
 {
        /* Here to the end of buffer, unless they haven't written some. */
        *len = ringbuf_datasize - h->read;
@@ -132,14 +133,14 @@
        return buf + h->read;
 }
 
-static void update_output_chunk(struct ringbuf_head *h, u32 len)
+static void update_output_chunk(struct ringbuf_head *h, uint32_t len)
 {
        h->write += len;
        if (h->write == ringbuf_datasize)
                h->write = 0;
 }
 
-static void update_input_chunk(struct ringbuf_head *h, u32 len)
+static void update_input_chunk(struct ringbuf_head *h, uint32_t len)
 {
        h->read += len;
        if (h->read == ringbuf_datasize)
@@ -148,7 +149,7 @@
 
 static bool buffer_has_input(const struct ringbuf_head *h)
 {
-       u32 len;
+       uint32_t len;
 
        get_input_chunk(h, NULL, &len);
        return (len != 0);
@@ -156,7 +157,7 @@
 
 static bool buffer_has_output_room(const struct ringbuf_head *h)
 {
-       u32 len;
+       uint32_t len;
 
        get_output_chunk(h, NULL, &len);
        return (len != 0);
@@ -164,7 +165,7 @@
 
 static int writechn(struct connection *conn, const void *data, unsigned int 
len)
 {
-       u32 avail;
+       uint32_t avail;
        void *dest;
        struct ringbuf_head h;
 
@@ -189,7 +190,7 @@
 
 static int readchn(struct connection *conn, void *data, unsigned int len)
 {
-       u32 avail;
+       uint32_t avail;
        const void *src;
        struct ringbuf_head h;
        bool was_full;
@@ -268,7 +269,7 @@
 /* We scan all domains rather than use the information given here. */
 void handle_event(void)
 {
-       u16 port;
+       uint16_t port;
 
        if (read(event_fd, &port, sizeof(port)) != sizeof(port))
                barf_perror("Failed to read from event fd");
@@ -293,7 +294,7 @@
                 buffer_has_output_room(conn->domain->output));
 }
 
-static struct domain *new_domain(void *context, domid_t domid,
+static struct domain *new_domain(void *context, unsigned int domid,
                                 unsigned long mfn, int port,
                                 const char *path)
 {
@@ -338,7 +339,7 @@
 }
 
 
-static struct domain *find_domain_by_domid(domid_t domid)
+static struct domain *find_domain_by_domid(unsigned int domid)
 {
        struct domain *i;
 
@@ -355,9 +356,9 @@
 {
        struct domain *domain;
        char *vec[4];
-       domid_t domid;
+       unsigned int domid;
        unsigned long mfn;
-       u16 port;
+       uint16_t port;
        const char *path;
 
        if (get_strings(in, vec, ARRAY_SIZE(vec)) < ARRAY_SIZE(vec)) {
@@ -414,7 +415,7 @@
 void do_release(struct connection *conn, const char *domid_str)
 {
        struct domain *domain;
-       domid_t domid;
+       unsigned int domid;
 
        if (!domid_str) {
                send_error(conn, EINVAL);
@@ -453,7 +454,7 @@
 void do_get_domain_path(struct connection *conn, const char *domid_str)
 {
        struct domain *domain;
-       domid_t domid;
+       unsigned int domid;
 
        if (!domid_str) {
                send_error(conn, EINVAL);
diff -r 067b9aacb6c2 -r b3a255e88810 tools/xenstore/xenstored_transaction.c
--- a/tools/xenstore/xenstored_transaction.c    Wed Oct 12 09:11:35 2005
+++ b/tools/xenstore/xenstored_transaction.c    Wed Oct 12 10:07:37 2005
@@ -53,7 +53,7 @@
        struct list_head list;
 
        /* Connection-local identifier for this transaction. */
-       u32 id;
+       uint32_t id;
 
        /* Generation when transaction started. */
        unsigned int generation;
@@ -107,7 +107,7 @@
        return 0;
 }
 
-struct transaction *transaction_lookup(struct connection *conn, u32 id)
+struct transaction *transaction_lookup(struct connection *conn, uint32_t id)
 {
        struct transaction *trans;
 
diff -r 067b9aacb6c2 -r b3a255e88810 tools/xenstore/xenstored_transaction.h
--- a/tools/xenstore/xenstored_transaction.h    Wed Oct 12 09:11:35 2005
+++ b/tools/xenstore/xenstored_transaction.h    Wed Oct 12 10:07:37 2005
@@ -25,7 +25,7 @@
 void do_transaction_start(struct connection *conn, struct buffered_data *node);
 void do_transaction_end(struct connection *conn, const char *arg);
 
-struct transaction *transaction_lookup(struct connection *conn, u32 id);
+struct transaction *transaction_lookup(struct connection *conn, uint32_t id);
 
 /* This node was changed: can fail and longjmp. */
 void add_change_node(struct transaction *trans, const char *node,
diff -r 067b9aacb6c2 -r b3a255e88810 tools/xenstore/xs.c
--- a/tools/xenstore/xs.c       Wed Oct 12 09:11:35 2005
+++ b/tools/xenstore/xs.c       Wed Oct 12 10:07:37 2005
@@ -304,7 +304,7 @@
        unsigned int i;
        struct sigaction ignorepipe, oldact;
 
-       msg.tx_id = (u32)(unsigned long)t;
+       msg.tx_id = (uint32_t)(unsigned long)t;
        msg.type = type;
        msg.len = 0;
        for (i = 0; i < num_vecs; i++)
@@ -510,7 +510,7 @@
        iov[0].iov_len = strlen(path) + 1;
        
        for (i = 0; i < num_perms; i++) {
-               char buffer[MAX_STRLEN(domid_t)+1];
+               char buffer[MAX_STRLEN(unsigned int)+1];
 
                if (!xs_perm_to_string(&perms[i], buffer))
                        goto unwind;
@@ -672,7 +672,8 @@
  * This tells the store daemon about a shared memory page and event channel
  * associated with a domain: the domain uses these to communicate.
  */
-bool xs_introduce_domain(struct xs_handle *h, domid_t domid, unsigned long mfn,
+bool xs_introduce_domain(struct xs_handle *h,
+                        unsigned int domid, unsigned long mfn,
                         unsigned int eventchn, const char *path)
 {
        char domid_str[MAX_STRLEN(domid)];
@@ -697,7 +698,7 @@
                                ARRAY_SIZE(iov), NULL));
 }
 
-bool xs_release_domain(struct xs_handle *h, domid_t domid)
+bool xs_release_domain(struct xs_handle *h, unsigned int domid)
 {
        char domid_str[MAX_STRLEN(domid)];
 
@@ -706,7 +707,7 @@
        return xs_bool(xs_single(h, NULL, XS_RELEASE, domid_str, NULL));
 }
 
-char *xs_get_domain_path(struct xs_handle *h, domid_t domid)
+char *xs_get_domain_path(struct xs_handle *h, unsigned int domid)
 {
        char domid_str[MAX_STRLEN(domid)];
 
diff -r 067b9aacb6c2 -r b3a255e88810 tools/xenstore/xs.h
--- a/tools/xenstore/xs.h       Wed Oct 12 09:11:35 2005
+++ b/tools/xenstore/xs.h       Wed Oct 12 10:07:37 2005
@@ -124,20 +124,23 @@
                        bool abort);
 
 /* Introduce a new domain.
- * This tells the store daemon about a shared memory page, event channel
- * and store path associated with a domain: the domain uses these to 
communicate.
+ * This tells the store daemon about a shared memory page, event channel and
+ * store path associated with a domain: the domain uses these to communicate.
  */
-bool xs_introduce_domain(struct xs_handle *h, domid_t domid, unsigned long mfn,
-                         unsigned int eventchn, const char *path);
+bool xs_introduce_domain(struct xs_handle *h,
+                        unsigned int domid,
+                        unsigned long mfn,
+                         unsigned int eventchn,
+                        const char *path);
 
 /* Release a domain.
  * Tells the store domain to release the memory page to the domain.
  */
-bool xs_release_domain(struct xs_handle *h, domid_t domid);
+bool xs_release_domain(struct xs_handle *h, unsigned int domid);
 
 /* Query the home path of a domain.
  */
-char *xs_get_domain_path(struct xs_handle *h, domid_t domid);
+char *xs_get_domain_path(struct xs_handle *h, unsigned int domid);
 
 /* Only useful for DEBUG versions */
 char *xs_debug_command(struct xs_handle *h, const char *cmd,
diff -r 067b9aacb6c2 -r b3a255e88810 tools/xenstore/xs_crashme.c
--- a/tools/xenstore/xs_crashme.c       Wed Oct 12 09:11:35 2005
+++ b/tools/xenstore/xs_crashme.c       Wed Oct 12 10:07:37 2005
@@ -68,19 +68,19 @@
  * of bytes.  No alignment or length assumptions are made about
  * the input key.
  */
-static inline u32 jhash(const void *key, u32 length, u32 initval)
-{
-       u32 a, b, c, len;
-       const u8 *k = key;
+static inline uint32_t jhash(const void *key, uint32_t length, uint32_t 
initval)
+{
+       uint32_t a, b, c, len;
+       const uint8_t *k = key;
 
        len = length;
        a = b = JHASH_GOLDEN_RATIO;
        c = initval;
 
        while (len >= 12) {
-               a += (k[0] +((u32)k[1]<<8) +((u32)k[2]<<16) +((u32)k[3]<<24));
-               b += (k[4] +((u32)k[5]<<8) +((u32)k[6]<<16) +((u32)k[7]<<24));
-               c += (k[8] +((u32)k[9]<<8) +((u32)k[10]<<16)+((u32)k[11]<<24));
+               a += (k[0] +((uint32_t)k[1]<<8) +((uint32_t)k[2]<<16) 
+((uint32_t)k[3]<<24));
+               b += (k[4] +((uint32_t)k[5]<<8) +((uint32_t)k[6]<<16) 
+((uint32_t)k[7]<<24));
+               c += (k[8] +((uint32_t)k[9]<<8) 
+((uint32_t)k[10]<<16)+((uint32_t)k[11]<<24));
 
                __jhash_mix(a,b,c);
 
@@ -90,16 +90,16 @@
 
        c += length;
        switch (len) {
-       case 11: c += ((u32)k[10]<<24);
-       case 10: c += ((u32)k[9]<<16);
-       case 9 : c += ((u32)k[8]<<8);
-       case 8 : b += ((u32)k[7]<<24);
-       case 7 : b += ((u32)k[6]<<16);
-       case 6 : b += ((u32)k[5]<<8);
+       case 11: c += ((uint32_t)k[10]<<24);
+       case 10: c += ((uint32_t)k[9]<<16);
+       case 9 : c += ((uint32_t)k[8]<<8);
+       case 8 : b += ((uint32_t)k[7]<<24);
+       case 7 : b += ((uint32_t)k[6]<<16);
+       case 6 : b += ((uint32_t)k[5]<<8);
        case 5 : b += k[4];
-       case 4 : a += ((u32)k[3]<<24);
-       case 3 : a += ((u32)k[2]<<16);
-       case 2 : a += ((u32)k[1]<<8);
+       case 4 : a += ((uint32_t)k[3]<<24);
+       case 3 : a += ((uint32_t)k[2]<<16);
+       case 2 : a += ((uint32_t)k[1]<<8);
        case 1 : a += k[0];
        };
 
@@ -108,12 +108,12 @@
        return c;
 }
 
-/* A special optimized version that handles 1 or more of u32s.
- * The length parameter here is the number of u32s in the key.
+/* A special optimized version that handles 1 or more of uint32_ts.
+ * The length parameter here is the number of uint32_ts in the key.
  */
-static inline u32 jhash2(u32 *k, u32 length, u32 initval)
-{
-       u32 a, b, c, len;
+static inline uint32_t jhash2(uint32_t *k, uint32_t length, uint32_t initval)
+{
+       uint32_t a, b, c, len;
 
        a = b = JHASH_GOLDEN_RATIO;
        c = initval;
@@ -146,7 +146,7 @@
  * NOTE: In partilar the "c += length; __jhash_mix(a,b,c);" normally
  *       done at the end is not done here.
  */
-static inline u32 jhash_3words(u32 a, u32 b, u32 c, u32 initval)
+static inline uint32_t jhash_3words(uint32_t a, uint32_t b, uint32_t c, 
uint32_t initval)
 {
        a += JHASH_GOLDEN_RATIO;
        b += JHASH_GOLDEN_RATIO;
@@ -157,12 +157,12 @@
        return c;
 }
 
-static inline u32 jhash_2words(u32 a, u32 b, u32 initval)
+static inline uint32_t jhash_2words(uint32_t a, uint32_t b, uint32_t initval)
 {
        return jhash_3words(a, b, 0, initval);
 }
 
-static inline u32 jhash_1word(u32 a, u32 initval)
+static inline uint32_t jhash_1word(uint32_t a, uint32_t initval)
 {
        return jhash_3words(a, 0, 0, initval);
 }
diff -r 067b9aacb6c2 -r b3a255e88810 tools/xenstore/xs_lib.c
--- a/tools/xenstore/xs_lib.c   Wed Oct 12 09:11:35 2005
+++ b/tools/xenstore/xs_lib.c   Wed Oct 12 10:07:37 2005
@@ -135,7 +135,7 @@
        return true;
 }
 
-/* Convert permissions to a string (up to len MAX_STRLEN(domid_t)+1). */
+/* Convert permissions to a string (up to len MAX_STRLEN(unsigned int)+1). */
 bool xs_perm_to_string(const struct xs_permissions *perm, char *buffer)
 {
        switch (perm->perms) {
diff -r 067b9aacb6c2 -r b3a255e88810 tools/xenstore/xs_lib.h
--- a/tools/xenstore/xs_lib.h   Wed Oct 12 09:11:35 2005
+++ b/tools/xenstore/xs_lib.h   Wed Oct 12 10:07:37 2005
@@ -22,8 +22,8 @@
 
 #include <stdbool.h>
 #include <limits.h>
-#include <xenctrl.h>
 #include <errno.h>
+#include <stdint.h>
 #include <xen/io/xs_wire.h>
 
 /* Bitmask of permissions. */
@@ -58,7 +58,7 @@
 bool xs_strings_to_perms(struct xs_permissions *perms, unsigned int num,
                         const char *strings);
 
-/* Convert permissions to a string (up to len MAX_STRLEN(domid_t)+1). */
+/* Convert permissions to a string (up to len MAX_STRLEN(unsigned int)+1). */
 bool xs_perm_to_string(const struct xs_permissions *perm, char *buffer);
 
 /* Given a string and a length, count how many strings (nul terms). */
diff -r 067b9aacb6c2 -r b3a255e88810 tools/xenstore/xs_random.c
--- a/tools/xenstore/xs_random.c        Wed Oct 12 09:11:35 2005
+++ b/tools/xenstore/xs_random.c        Wed Oct 12 10:07:37 2005
@@ -594,19 +594,19 @@
  * of bytes.  No alignment or length assumptions are made about
  * the input key.
  */
-static inline u32 jhash(const void *key, u32 length, u32 initval)
-{
-       u32 a, b, c, len;
-       const u8 *k = key;
+static inline uint32_t jhash(const void *key, uint32_t length, uint32_t 
initval)
+{
+       uint32_t a, b, c, len;
+       const uint8_t *k = key;
 
        len = length;
        a = b = JHASH_GOLDEN_RATIO;
        c = initval;
 
        while (len >= 12) {
-               a += (k[0] +((u32)k[1]<<8) +((u32)k[2]<<16) +((u32)k[3]<<24));
-               b += (k[4] +((u32)k[5]<<8) +((u32)k[6]<<16) +((u32)k[7]<<24));
-               c += (k[8] +((u32)k[9]<<8) +((u32)k[10]<<16)+((u32)k[11]<<24));
+               a += (k[0] +((uint32_t)k[1]<<8) +((uint32_t)k[2]<<16) 
+((uint32_t)k[3]<<24));
+               b += (k[4] +((uint32_t)k[5]<<8) +((uint32_t)k[6]<<16) 
+((uint32_t)k[7]<<24));
+               c += (k[8] +((uint32_t)k[9]<<8) 
+((uint32_t)k[10]<<16)+((uint32_t)k[11]<<24));
 
                __jhash_mix(a,b,c);
 
@@ -616,16 +616,16 @@
 
        c += length;
        switch (len) {
-       case 11: c += ((u32)k[10]<<24);
-       case 10: c += ((u32)k[9]<<16);
-       case 9 : c += ((u32)k[8]<<8);
-       case 8 : b += ((u32)k[7]<<24);
-       case 7 : b += ((u32)k[6]<<16);
-       case 6 : b += ((u32)k[5]<<8);
+       case 11: c += ((uint32_t)k[10]<<24);
+       case 10: c += ((uint32_t)k[9]<<16);
+       case 9 : c += ((uint32_t)k[8]<<8);
+       case 8 : b += ((uint32_t)k[7]<<24);
+       case 7 : b += ((uint32_t)k[6]<<16);
+       case 6 : b += ((uint32_t)k[5]<<8);
        case 5 : b += k[4];
-       case 4 : a += ((u32)k[3]<<24);
-       case 3 : a += ((u32)k[2]<<16);
-       case 2 : a += ((u32)k[1]<<8);
+       case 4 : a += ((uint32_t)k[3]<<24);
+       case 3 : a += ((uint32_t)k[2]<<16);
+       case 2 : a += ((uint32_t)k[1]<<8);
        case 1 : a += k[0];
        };
 
@@ -634,12 +634,12 @@
        return c;
 }
 
-/* A special optimized version that handles 1 or more of u32s.
- * The length parameter here is the number of u32s in the key.
+/* A special optimized version that handles 1 or more of uint32_ts.
+ * The length parameter here is the number of uint32_ts in the key.
  */
-static inline u32 jhash2(u32 *k, u32 length, u32 initval)
-{
-       u32 a, b, c, len;
+static inline uint32_t jhash2(uint32_t *k, uint32_t length, uint32_t initval)
+{
+       uint32_t a, b, c, len;
 
        a = b = JHASH_GOLDEN_RATIO;
        c = initval;
@@ -672,7 +672,7 @@
  * NOTE: In partilar the "c += length; __jhash_mix(a,b,c);" normally
  *       done at the end is not done here.
  */
-static inline u32 jhash_3words(u32 a, u32 b, u32 c, u32 initval)
+static inline uint32_t jhash_3words(uint32_t a, uint32_t b, uint32_t c, 
uint32_t initval)
 {
        a += JHASH_GOLDEN_RATIO;
        b += JHASH_GOLDEN_RATIO;
@@ -683,12 +683,12 @@
        return c;
 }
 
-static inline u32 jhash_2words(u32 a, u32 b, u32 initval)
+static inline uint32_t jhash_2words(uint32_t a, uint32_t b, uint32_t initval)
 {
        return jhash_3words(a, b, 0, initval);
 }
 
-static inline u32 jhash_1word(u32 a, u32 initval)
+static inline uint32_t jhash_1word(uint32_t a, uint32_t initval)
 {
        return jhash_3words(a, 0, 0, initval);
 }
diff -r 067b9aacb6c2 -r b3a255e88810 tools/xenstore/xs_tdb_dump.c
--- a/tools/xenstore/xs_tdb_dump.c      Wed Oct 12 09:11:35 2005
+++ b/tools/xenstore/xs_tdb_dump.c      Wed Oct 12 10:07:37 2005
@@ -11,13 +11,13 @@
 #include "utils.h"
 
 struct record_hdr {
-       u32 num_perms;
-       u32 datalen;
-       u32 childlen;
+       uint32_t num_perms;
+       uint32_t datalen;
+       uint32_t childlen;
        struct xs_permissions perms[0];
 };
 
-static u32 total_size(struct record_hdr *hdr)
+static uint32_t total_size(struct record_hdr *hdr)
 {
        return sizeof(*hdr) + hdr->num_perms * sizeof(struct xs_permissions) 
                + hdr->datalen + hdr->childlen;
diff -r 067b9aacb6c2 -r b3a255e88810 tools/xenstore/xs_test.c
--- a/tools/xenstore/xs_test.c  Wed Oct 12 09:11:35 2005
+++ b/tools/xenstore/xs_test.c  Wed Oct 12 10:07:37 2005
@@ -561,7 +561,7 @@
 
        /* Tell them the event channel and our PID. */
        *(int *)((void *)out + 32) = getpid();
-       *(u16 *)((void *)out + 36) = atoi(eventchn);
+       *(uint16_t *)((void *)out + 36) = atoi(eventchn);
 
        if (!xs_introduce_domain(handles[handle], atoi(domid),
                                 atol(mfn), atoi(eventchn), path)) {
diff -r 067b9aacb6c2 -r b3a255e88810 tools/xentrace/xenctx.c
--- a/tools/xentrace/xenctx.c   Wed Oct 12 09:11:35 2005
+++ b/tools/xentrace/xenctx.c   Wed Oct 12 10:07:37 2005
@@ -81,7 +81,7 @@
 }
 #endif
 
-void dump_ctx(u32 domid, u32 vcpu)
+void dump_ctx(uint32_t domid, uint32_t vcpu)
 {
     int ret;
     vcpu_guest_context_t ctx;
diff -r 067b9aacb6c2 -r b3a255e88810 tools/xentrace/xentrace.c
--- a/tools/xentrace/xentrace.c Wed Oct 12 09:11:35 2005
+++ b/tools/xentrace/xentrace.c Wed Oct 12 10:07:37 2005
@@ -45,8 +45,8 @@
     char *outfile;
     struct timespec poll_sleep;
     unsigned long new_data_thresh;
-    u32 evt_mask;
-    u32 cpu_mask;
+    uint32_t evt_mask;
+    uint32_t cpu_mask;
 } settings_t;
 
 settings_t opts;
@@ -168,7 +168,7 @@
  * @type:           the new mask type,0-event mask, 1-cpu mask
  *
  */
-void set_mask(u32 mask, int type)
+void set_mask(uint32_t mask, int type)
 {
     int ret;
     dom0_op_t op;                        /* dom0 op we'll build             */
@@ -496,7 +496,8 @@
     "\v"
     "This tool is used to capture trace buffer data from Xen.  The data is "
     "output in a binary format, in the following order:\n\n"
-    "  CPU(uint) TSC(u64) EVENT(u32) D1 D2 D3 D4 D5 (all u32)\n\n"
+    "  CPU(uint) TSC(uint64_t) EVENT(uint32_t) D1 D2 D3 D4 D5 "
+    "(all uint32_t)\n\n"
     "The output should be parsed using the tool xentrace_format, which can "
     "produce human-readable output in ASCII format."
 };
diff -r 067b9aacb6c2 -r b3a255e88810 xen/include/public/acm.h
--- a/xen/include/public/acm.h  Wed Oct 12 09:11:35 2005
+++ b/xen/include/public/acm.h  Wed Oct 12 10:07:37 2005
@@ -8,7 +8,7 @@
  *
  * Contributors:
  * Stefan Berger <stefanb@xxxxxxxxxxxxxx> 
- *     added network byte order support for binary policies
+ * added network byte order support for binary policies
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -41,24 +41,24 @@
 #endif
 
 /* default ssid reference value if not supplied */
-#define ACM_DEFAULT_SSID       0x0
+#define ACM_DEFAULT_SSID  0x0
 #define ACM_DEFAULT_LOCAL_SSID  0x0
 
 /* Internal ACM ERROR types */
-#define ACM_OK                          0
-#define ACM_UNDEF                      -1
-#define ACM_INIT_SSID_ERROR            -2
-#define ACM_INIT_SOID_ERROR            -3
-#define ACM_ERROR                      -4
+#define ACM_OK     0
+#define ACM_UNDEF   -1
+#define ACM_INIT_SSID_ERROR  -2
+#define ACM_INIT_SOID_ERROR  -3
+#define ACM_ERROR          -4
 
 /* External ACCESS DECISIONS */
-#define ACM_ACCESS_PERMITTED           0
-#define ACM_ACCESS_DENIED              -111
-#define ACM_NULL_POINTER_ERROR         -200
+#define ACM_ACCESS_PERMITTED  0
+#define ACM_ACCESS_DENIED  -111
+#define ACM_NULL_POINTER_ERROR  -200
 
 /* primary policy in lower 4 bits */
-#define ACM_NULL_POLICY        0
-#define ACM_CHINESE_WALL_POLICY        1
+#define ACM_NULL_POLICY 0
+#define ACM_CHINESE_WALL_POLICY 1
 #define ACM_SIMPLE_TYPE_ENFORCEMENT_POLICY 2
 
 /* combinations have secondary policy component in higher 4bit */
@@ -67,7 +67,7 @@
 
 /* policy: */
 #define ACM_POLICY_NAME(X) \
-       ((X) == (ACM_NULL_POLICY)) ? "NULL policy" :                        \
+ ((X) == (ACM_NULL_POLICY)) ? "NULL policy" :                        \
     ((X) == (ACM_CHINESE_WALL_POLICY)) ? "CHINESE WALL policy" :        \
     ((X) == (ACM_SIMPLE_TYPE_ENFORCEMENT_POLICY)) ? "SIMPLE TYPE ENFORCEMENT 
policy" : \
     ((X) == (ACM_CHINESE_WALL_AND_SIMPLE_TYPE_ENFORCEMENT_POLICY)) ? "CHINESE 
WALL AND SIMPLE TYPE ENFORCEMENT policy" : \
@@ -77,17 +77,17 @@
  * whenever the interpretation of the related
  * policy's data structure changes
  */
-#define ACM_POLICY_VERSION     1
-#define ACM_CHWALL_VERSION     1
-#define ACM_STE_VERSION                1
+#define ACM_POLICY_VERSION 1
+#define ACM_CHWALL_VERSION 1
+#define ACM_STE_VERSION  1
 
 /* defines a ssid reference used by xen */
-typedef u32 ssidref_t;
+typedef uint32_t ssidref_t;
 
 /* -------security policy relevant type definitions-------- */
 
 /* type identifier; compares to "equal" or "not equal" */
-typedef u16 domaintype_t;
+typedef uint16_t domaintype_t;
 
 /* CHINESE WALL POLICY DATA STRUCTURES
  *
@@ -109,7 +109,7 @@
  *    with type i and is "1" otherwise.
  */
 /* high-16 = version, low-16 = check magic */
-#define ACM_MAGIC              0x0001debc
+#define ACM_MAGIC  0x0001debc
 
 /* each offset in bytes from start of the struct they
  * are part of */
@@ -123,62 +123,72 @@
  * tools that assume packed representations (e.g. the java tool)
  */
 struct acm_policy_buffer {
-       u32 policy_version; /* ACM_POLICY_VERSION */
-    u32 magic;
-       u32 len;
-       u32 primary_policy_code;
-       u32 primary_buffer_offset;
-       u32 secondary_policy_code;
-       u32 secondary_buffer_offset;
+    uint32_t policy_version; /* ACM_POLICY_VERSION */
+    uint32_t magic;
+    uint32_t len;
+    uint32_t primary_policy_code;
+    uint32_t primary_buffer_offset;
+    uint32_t secondary_policy_code;
+    uint32_t secondary_buffer_offset;
 };
 
 struct acm_chwall_policy_buffer {
-       u32 policy_version; /* ACM_CHWALL_VERSION */
-       u32 policy_code;
-       u32 chwall_max_types;
-       u32 chwall_max_ssidrefs;
-       u32 chwall_max_conflictsets;
-       u32 chwall_ssid_offset;
-       u32 chwall_conflict_sets_offset;
-       u32 chwall_running_types_offset;
-       u32 chwall_conflict_aggregate_offset;
+    uint32_t policy_version; /* ACM_CHWALL_VERSION */
+    uint32_t policy_code;
+    uint32_t chwall_max_types;
+    uint32_t chwall_max_ssidrefs;
+    uint32_t chwall_max_conflictsets;
+    uint32_t chwall_ssid_offset;
+    uint32_t chwall_conflict_sets_offset;
+    uint32_t chwall_running_types_offset;
+    uint32_t chwall_conflict_aggregate_offset;
 };
 
 struct acm_ste_policy_buffer {
-       u32 policy_version; /* ACM_STE_VERSION */
-       u32 policy_code;
-       u32 ste_max_types;
-       u32 ste_max_ssidrefs;
-       u32 ste_ssid_offset;
+    uint32_t policy_version; /* ACM_STE_VERSION */
+    uint32_t policy_code;
+    uint32_t ste_max_types;
+    uint32_t ste_max_ssidrefs;
+    uint32_t ste_ssid_offset;
 };
 
 struct acm_stats_buffer {
-    u32 magic;
-       u32 len;
-       u32 primary_policy_code;
-       u32 primary_stats_offset;
-       u32 secondary_policy_code;
-       u32 secondary_stats_offset;
+    uint32_t magic;
+    uint32_t len;
+    uint32_t primary_policy_code;
+    uint32_t primary_stats_offset;
+    uint32_t secondary_policy_code;
+    uint32_t secondary_stats_offset;
 };
 
 struct acm_ste_stats_buffer {
-       u32 ec_eval_count;
-       u32 gt_eval_count;
-       u32 ec_denied_count;
-       u32 gt_denied_count; 
-       u32 ec_cachehit_count;
-       u32 gt_cachehit_count;
+    uint32_t ec_eval_count;
+    uint32_t gt_eval_count;
+    uint32_t ec_denied_count;
+    uint32_t gt_denied_count; 
+    uint32_t ec_cachehit_count;
+    uint32_t gt_cachehit_count;
 };
 
 struct acm_ssid_buffer {
-       u32 len;
+    uint32_t len;
     ssidref_t ssidref;
-       u32 primary_policy_code;
-       u32 primary_max_types;
-    u32 primary_types_offset;
-       u32 secondary_policy_code;
-    u32 secondary_max_types;
-       u32 secondary_types_offset;
+    uint32_t primary_policy_code;
+    uint32_t primary_max_types;
+    uint32_t primary_types_offset;
+    uint32_t secondary_policy_code;
+    uint32_t secondary_max_types;
+    uint32_t secondary_types_offset;
 };
 
 #endif
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 067b9aacb6c2 -r b3a255e88810 xen/include/public/acm_ops.h
--- a/xen/include/public/acm_ops.h      Wed Oct 12 09:11:35 2005
+++ b/xen/include/public/acm_ops.h      Wed Oct 12 10:07:37 2005
@@ -1,4 +1,3 @@
-
 /******************************************************************************
  * acm_ops.h
  *
@@ -32,44 +31,44 @@
 
 /************************************************************************/
 
-#define ACM_SETPOLICY          4
+#define ACM_SETPOLICY         4
 typedef struct acm_setpolicy {
     /* OUT variables */
     void *pushcache;
-    u16 pushcache_size;
+    uint16_t pushcache_size;
 } acm_setpolicy_t;
 
 
-#define ACM_GETPOLICY          5
+#define ACM_GETPOLICY         5
 typedef struct acm_getpolicy {
     /* OUT variables */
     void *pullcache;
-    u16 pullcache_size;
+    uint16_t pullcache_size;
 } acm_getpolicy_t;
 
 
-#define ACM_DUMPSTATS          6
+#define ACM_DUMPSTATS         6
 typedef struct acm_dumpstats {
     void *pullcache;
-    u16 pullcache_size;
+    uint16_t pullcache_size;
 } acm_dumpstats_t;
 
 
-#define ACM_GETSSID            7
+#define ACM_GETSSID           7
 enum get_type {UNSET, SSIDREF, DOMAINID};
 typedef struct acm_getssid {
-       enum get_type get_ssid_by;
-       union {
-               domaintype_t domainid;
-               ssidref_t    ssidref;
-       } id;
+    enum get_type get_ssid_by;
+    union {
+        domaintype_t domainid;
+        ssidref_t    ssidref;
+    } id;
     void *ssidbuf;
-    u16 ssidbuf_size;
+    uint16_t ssidbuf_size;
 } acm_getssid_t;
 
 typedef struct acm_op {
-    u32 cmd;
-    u32 interface_version;      /* ACM_INTERFACE_VERSION */
+    uint32_t cmd;
+    uint32_t interface_version;      /* ACM_INTERFACE_VERSION */
     union {
         acm_setpolicy_t setpolicy;
         acm_getpolicy_t getpolicy;
@@ -79,3 +78,13 @@
 } acm_op_t;
 
 #endif                          /* __XEN_PUBLIC_ACM_OPS_H__ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 067b9aacb6c2 -r b3a255e88810 xen/include/public/arch-ia64.h
--- a/xen/include/public/arch-ia64.h    Wed Oct 12 09:11:35 2005
+++ b/xen/include/public/arch-ia64.h    Wed Oct 12 10:07:37 2005
@@ -13,30 +13,30 @@
 
 #ifndef __ASSEMBLY__
 
-#define MAX_NR_SECTION  32  // at most 32 memory holes
-typedef struct {
-    unsigned long      start;  /* start of memory hole */
-    unsigned long      end;    /* end of memory hole */
+#define MAX_NR_SECTION  32  /* at most 32 memory holes */
+typedef struct {
+    unsigned long start;  /* start of memory hole */
+    unsigned long end;    /* end of memory hole */
 } mm_section_t;
 
 typedef struct {
-    unsigned long      mfn : 56;
-    unsigned long      type: 8;
+    unsigned long mfn : 56;
+    unsigned long type: 8;
 } pmt_entry_t;
 
-#define GPFN_MEM               (0UL << 56)     /* Guest pfn is normal mem */
-#define GPFN_FRAME_BUFFER      (1UL << 56)     /* VGA framebuffer */
-#define GPFN_LOW_MMIO          (2UL << 56)     /* Low MMIO range */
-#define GPFN_PIB               (3UL << 56)     /* PIB base */
-#define GPFN_IOSAPIC           (4UL << 56)     /* IOSAPIC base */
-#define GPFN_LEGACY_IO         (5UL << 56)     /* Legacy I/O base */
-#define GPFN_GFW               (6UL << 56)     /* Guest Firmware */
-#define GPFN_HIGH_MMIO         (7UL << 56)     /* High MMIO range */
-
-#define GPFN_IO_MASK           (7UL << 56)     /* Guest pfn is I/O type */
-#define GPFN_INV_MASK          (31UL << 59)    /* Guest pfn is invalid */
-
-#define INVALID_MFN              (~0UL)
+#define GPFN_MEM          (0UL << 56) /* Guest pfn is normal mem */
+#define GPFN_FRAME_BUFFER (1UL << 56) /* VGA framebuffer */
+#define GPFN_LOW_MMIO     (2UL << 56) /* Low MMIO range */
+#define GPFN_PIB          (3UL << 56) /* PIB base */
+#define GPFN_IOSAPIC      (4UL << 56) /* IOSAPIC base */
+#define GPFN_LEGACY_IO    (5UL << 56) /* Legacy I/O base */
+#define GPFN_GFW          (6UL << 56) /* Guest Firmware */
+#define GPFN_HIGH_MMIO    (7UL << 56) /* High MMIO range */
+
+#define GPFN_IO_MASK     (7UL << 56)  /* Guest pfn is I/O type */
+#define GPFN_INV_MASK    (31UL << 59) /* Guest pfn is invalid */
+
+#define INVALID_MFN       (~0UL)
 
 /*
  * NB. This may become a 64-bit count with no shift. If this happens then the 
@@ -48,198 +48,198 @@
 } tsc_timestamp_t; /* 8 bytes */
 
 struct pt_fpreg {
-        union {
-                unsigned long bits[2];
-                long double __dummy;    /* force 16-byte alignment */
-        } u;
+    union {
+        unsigned long bits[2];
+        long double __dummy;    /* force 16-byte alignment */
+    } u;
 };
 
 typedef struct cpu_user_regs{
-       /* The following registers are saved by SAVE_MIN: */
-       unsigned long b6;               /* scratch */
-       unsigned long b7;               /* scratch */
-
-       unsigned long ar_csd;           /* used by cmp8xchg16 (scratch) */
-       unsigned long ar_ssd;           /* reserved for future use (scratch) */
-
-       unsigned long r8;               /* scratch (return value register 0) */
-       unsigned long r9;               /* scratch (return value register 1) */
-       unsigned long r10;              /* scratch (return value register 2) */
-       unsigned long r11;              /* scratch (return value register 3) */
-
-       unsigned long cr_ipsr;          /* interrupted task's psr */
-       unsigned long cr_iip;           /* interrupted task's instruction 
pointer */
-       unsigned long cr_ifs;           /* interrupted task's function state */
-
-       unsigned long ar_unat;          /* interrupted task's NaT register 
(preserved) */
-       unsigned long ar_pfs;           /* prev function state  */
-       unsigned long ar_rsc;           /* RSE configuration */
-       /* The following two are valid only if cr_ipsr.cpl > 0: */
-       unsigned long ar_rnat;          /* RSE NaT */
-       unsigned long ar_bspstore;      /* RSE bspstore */
-
-       unsigned long pr;               /* 64 predicate registers (1 bit each) 
*/
-       unsigned long b0;               /* return pointer (bp) */
-       unsigned long loadrs;           /* size of dirty partition << 16 */
-
-       unsigned long r1;               /* the gp pointer */
-       unsigned long r12;              /* interrupted task's memory stack 
pointer */
-       unsigned long r13;              /* thread pointer */
-
-       unsigned long ar_fpsr;          /* floating point status (preserved) */
-       unsigned long r15;              /* scratch */
-
-       /* The remaining registers are NOT saved for system calls.  */
-
-       unsigned long r14;              /* scratch */
-       unsigned long r2;               /* scratch */
-       unsigned long r3;               /* scratch */
-    unsigned long r16;         /* scratch */
-       unsigned long r17;              /* scratch */
-    unsigned long r18;         /* scratch */
-       unsigned long r19;              /* scratch */
-    unsigned long r20;         /* scratch */
-       unsigned long r21;              /* scratch */
-       unsigned long r22;              /* scratch */
-       unsigned long r23;              /* scratch */
-       unsigned long r24;              /* scratch */
-       unsigned long r25;              /* scratch */
-       unsigned long r26;              /* scratch */
-       unsigned long r27;              /* scratch */
-       unsigned long r28;              /* scratch */
-       unsigned long r29;              /* scratch */
-       unsigned long r30;              /* scratch */
-       unsigned long r31;              /* scratch */
-       unsigned long ar_ccv;           /* compare/exchange value (scratch) */
-
-       /*
-        * Floating point registers that the kernel considers scratch:
-        */
-       struct pt_fpreg f6;             /* scratch */
-       struct pt_fpreg f7;             /* scratch */
-       struct pt_fpreg f8;             /* scratch */
-       struct pt_fpreg f9;             /* scratch */
-       struct pt_fpreg f10;            /* scratch */
-       struct pt_fpreg f11;            /* scratch */
-       unsigned long r4;               /* preserved */
-    unsigned long r5;          /* preserved */
-       unsigned long r6;               /* preserved */
-    unsigned long r7;          /* preserved */
-       unsigned long eml_unat;    /* used for emulating instruction */
+    /* The following registers are saved by SAVE_MIN: */
+    unsigned long b6;  /* scratch */
+    unsigned long b7;  /* scratch */
+
+    unsigned long ar_csd; /* used by cmp8xchg16 (scratch) */
+    unsigned long ar_ssd; /* reserved for future use (scratch) */
+
+    unsigned long r8;  /* scratch (return value register 0) */
+    unsigned long r9;  /* scratch (return value register 1) */
+    unsigned long r10; /* scratch (return value register 2) */
+    unsigned long r11; /* scratch (return value register 3) */
+
+    unsigned long cr_ipsr; /* interrupted task's psr */
+    unsigned long cr_iip;  /* interrupted task's instruction pointer */
+    unsigned long cr_ifs;  /* interrupted task's function state */
+
+    unsigned long ar_unat; /* interrupted task's NaT register (preserved) */
+    unsigned long ar_pfs;  /* prev function state  */
+    unsigned long ar_rsc;  /* RSE configuration */
+    /* The following two are valid only if cr_ipsr.cpl > 0: */
+    unsigned long ar_rnat;  /* RSE NaT */
+    unsigned long ar_bspstore; /* RSE bspstore */
+
+    unsigned long pr;  /* 64 predicate registers (1 bit each) */
+    unsigned long b0;  /* return pointer (bp) */
+    unsigned long loadrs;  /* size of dirty partition << 16 */
+
+    unsigned long r1;  /* the gp pointer */
+    unsigned long r12; /* interrupted task's memory stack pointer */
+    unsigned long r13; /* thread pointer */
+
+    unsigned long ar_fpsr;  /* floating point status (preserved) */
+    unsigned long r15;  /* scratch */
+
+ /* The remaining registers are NOT saved for system calls.  */
+
+    unsigned long r14;  /* scratch */
+    unsigned long r2;  /* scratch */
+    unsigned long r3;  /* scratch */
+    unsigned long r16;  /* scratch */
+    unsigned long r17;  /* scratch */
+    unsigned long r18;  /* scratch */
+    unsigned long r19;  /* scratch */
+    unsigned long r20;  /* scratch */
+    unsigned long r21;  /* scratch */
+    unsigned long r22;  /* scratch */
+    unsigned long r23;  /* scratch */
+    unsigned long r24;  /* scratch */
+    unsigned long r25;  /* scratch */
+    unsigned long r26;  /* scratch */
+    unsigned long r27;  /* scratch */
+    unsigned long r28;  /* scratch */
+    unsigned long r29;  /* scratch */
+    unsigned long r30;  /* scratch */
+    unsigned long r31;  /* scratch */
+    unsigned long ar_ccv;  /* compare/exchange value (scratch) */
+
+    /*
+     * Floating point registers that the kernel considers scratch:
+     */
+    struct pt_fpreg f6;  /* scratch */
+    struct pt_fpreg f7;  /* scratch */
+    struct pt_fpreg f8;  /* scratch */
+    struct pt_fpreg f9;  /* scratch */
+    struct pt_fpreg f10;  /* scratch */
+    struct pt_fpreg f11;  /* scratch */
+    unsigned long r4;  /* preserved */
+    unsigned long r5;  /* preserved */
+    unsigned long r6;  /* preserved */
+    unsigned long r7;  /* preserved */
+    unsigned long eml_unat;    /* used for emulating instruction */
     unsigned long rfi_pfs;     /* used for elulating rfi */
 
 }cpu_user_regs_t;
 
 typedef union {
-       unsigned long value;
-       struct {
-               int     a_int:1;
-               int     a_from_int_cr:1;
-               int     a_to_int_cr:1;
-               int     a_from_psr:1;
-               int     a_from_cpuid:1;
-               int     a_cover:1;
-               int     a_bsw:1;
-               long    reserved:57;
-       };
+    unsigned long value;
+    struct {
+        int a_int:1;
+        int a_from_int_cr:1;
+        int a_to_int_cr:1;
+        int a_from_psr:1;
+        int a_from_cpuid:1;
+        int a_cover:1;
+        int a_bsw:1;
+        long reserved:57;
+    };
 } vac_t;
 
 typedef union {
-       unsigned long value;
-       struct {
-               int     d_vmsw:1;
-               int     d_extint:1;
-               int     d_ibr_dbr:1;
-               int     d_pmc:1;
-               int     d_to_pmd:1;
-               int     d_itm:1;
-               long    reserved:58;
-       };
+    unsigned long value;
+    struct {
+        int d_vmsw:1;
+        int d_extint:1;
+        int d_ibr_dbr:1;
+        int d_pmc:1;
+        int d_to_pmd:1;
+        int d_itm:1;
+        long reserved:58;
+    };
 } vdc_t;
 
 typedef struct {
-       vac_t                   vac;
-       vdc_t                   vdc;
-       unsigned long           virt_env_vaddr;
-       unsigned long           reserved1[29];
-       unsigned long           vhpi;
-       unsigned long           reserved2[95];
-       union {
-         unsigned long         vgr[16];
-         unsigned long bank1_regs[16]; // bank1 regs (r16-r31) when bank0 
active
-       };
-       union {
-         unsigned long         vbgr[16];
-         unsigned long bank0_regs[16]; // bank0 regs (r16-r31) when bank1 
active
-       };
-       unsigned long           vnat;
-       unsigned long           vbnat;
-       unsigned long           vcpuid[5];
-       unsigned long           reserved3[11];
-       unsigned long           vpsr;
-       unsigned long           vpr;
-       unsigned long           reserved4[76];
-       union {
-         unsigned long         vcr[128];
-          struct {
-           unsigned long       dcr;            // CR0
-           unsigned long       itm;
-           unsigned long       iva;
-           unsigned long       rsv1[5];
-           unsigned long       pta;            // CR8
-           unsigned long       rsv2[7];
-           unsigned long       ipsr;           // CR16
-           unsigned long       isr;
-           unsigned long       rsv3;
-           unsigned long       iip;
-           unsigned long       ifa;
-           unsigned long       itir;
-           unsigned long       iipa;
-           unsigned long       ifs;
-           unsigned long       iim;            // CR24
-           unsigned long       iha;
-           unsigned long       rsv4[38];
-           unsigned long       lid;            // CR64
-           unsigned long       ivr;
-           unsigned long       tpr;
-           unsigned long       eoi;
-           unsigned long       irr[4];
-           unsigned long       itv;            // CR72
-           unsigned long       pmv;
-           unsigned long       cmcv;
-           unsigned long       rsv5[5];
-           unsigned long       lrr0;           // CR80
-           unsigned long       lrr1;
-           unsigned long       rsv6[46];
-          };
-       };
-       union {
-         unsigned long         reserved5[128];
-         struct {
-           unsigned long precover_ifs;
-           unsigned long unat;  // not sure if this is needed until NaT arch 
is done
-           int interrupt_collection_enabled; // virtual psr.ic
-           int interrupt_delivery_enabled; // virtual psr.i
-           int pending_interruption;
-           int incomplete_regframe;    // see SDM vol2 6.8
-           unsigned long delivery_mask[4];
-           int metaphysical_mode;      // 1 = use metaphys mapping, 0 = use 
virtual
-           int banknum;        // 0 or 1, which virtual register bank is active
-           unsigned long rrs[8];       // region registers
-           unsigned long krs[8];       // kernel registers
-           unsigned long pkrs[8];      // protection key registers
-           unsigned long tmp[8];       // temp registers (e.g. for 
hyperprivops)
-               // FIXME: tmp[8] temp'ly being used for virtual psr.pp
-         };
+    vac_t   vac;
+    vdc_t   vdc;
+    unsigned long  virt_env_vaddr;
+    unsigned long  reserved1[29];
+    unsigned long  vhpi;
+    unsigned long  reserved2[95];
+    union {
+        unsigned long  vgr[16];
+        unsigned long bank1_regs[16]; // bank1 regs (r16-r31) when bank0 active
+    };
+    union {
+        unsigned long  vbgr[16];
+        unsigned long bank0_regs[16]; // bank0 regs (r16-r31) when bank1 active
+    };
+    unsigned long  vnat;
+    unsigned long  vbnat;
+    unsigned long  vcpuid[5];
+    unsigned long  reserved3[11];
+    unsigned long  vpsr;
+    unsigned long  vpr;
+    unsigned long  reserved4[76];
+    union {
+        unsigned long  vcr[128];
+        struct {
+            unsigned long dcr;  // CR0
+            unsigned long itm;
+            unsigned long iva;
+            unsigned long rsv1[5];
+            unsigned long pta;  // CR8
+            unsigned long rsv2[7];
+            unsigned long ipsr;  // CR16
+            unsigned long isr;
+            unsigned long rsv3;
+            unsigned long iip;
+            unsigned long ifa;
+            unsigned long itir;
+            unsigned long iipa;
+            unsigned long ifs;
+            unsigned long iim;  // CR24
+            unsigned long iha;
+            unsigned long rsv4[38];
+            unsigned long lid;  // CR64
+            unsigned long ivr;
+            unsigned long tpr;
+            unsigned long eoi;
+            unsigned long irr[4];
+            unsigned long itv;  // CR72
+            unsigned long pmv;
+            unsigned long cmcv;
+            unsigned long rsv5[5];
+            unsigned long lrr0;  // CR80
+            unsigned long lrr1;
+            unsigned long rsv6[46];
         };
-       unsigned long           reserved6[3456];
-       unsigned long           vmm_avail[128];
-       unsigned long           reserved7[4096];
+    };
+    union {
+        unsigned long  reserved5[128];
+        struct {
+            unsigned long precover_ifs;
+            unsigned long unat;  // not sure if this is needed until NaT arch 
is done
+            int interrupt_collection_enabled; // virtual psr.ic
+            int interrupt_delivery_enabled; // virtual psr.i
+            int pending_interruption;
+            int incomplete_regframe; // see SDM vol2 6.8
+            unsigned long delivery_mask[4];
+            int metaphysical_mode; // 1 = use metaphys mapping, 0 = use virtual
+            int banknum; // 0 or 1, which virtual register bank is active
+            unsigned long rrs[8]; // region registers
+            unsigned long krs[8]; // kernel registers
+            unsigned long pkrs[8]; // protection key registers
+            unsigned long tmp[8]; // temp registers (e.g. for hyperprivops)
+            // FIXME: tmp[8] temp'ly being used for virtual psr.pp
+        };
+    };
+    unsigned long  reserved6[3456];
+    unsigned long  vmm_avail[128];
+    unsigned long  reserved7[4096];
 } mapped_regs_t;
 
 typedef struct {
-       mapped_regs_t *privregs;
-       int evtchn_vector;
+    mapped_regs_t *privregs;
+    int evtchn_vector;
 } arch_vcpu_info_t;
 
 typedef mapped_regs_t vpd_t;
@@ -247,25 +247,35 @@
 #define __ARCH_HAS_VCPU_INFO
 
 typedef struct {
-       unsigned int flags;
-       unsigned long start_info_pfn;
-} arch_shared_info_t;          // DON'T PACK 
+    unsigned int flags;
+    unsigned long start_info_pfn;
+} arch_shared_info_t;  // DON'T PACK 
 
 typedef struct vcpu_guest_context {
 #define VGCF_FPU_VALID (1<<0)
 #define VGCF_VMX_GUEST (1<<1)
 #define VGCF_IN_KERNEL (1<<2)
-       unsigned long flags;       /* VGCF_* flags */
-       unsigned long pt_base;     /* PMT table base */
-       unsigned long share_io_pg; /* Shared page for I/O emulation */
-       unsigned long sys_pgnr;    /* System pages out of domain memory */
-       unsigned long vm_assist;   /* VMASST_TYPE_* bitmap, now none on IPF */
-
-       cpu_user_regs_t regs;
-       arch_vcpu_info_t vcpu;
-       arch_shared_info_t shared;
+    unsigned long flags;       /* VGCF_* flags */
+    unsigned long pt_base;     /* PMT table base */
+    unsigned long share_io_pg; /* Shared page for I/O emulation */
+    unsigned long sys_pgnr;    /* System pages out of domain memory */
+    unsigned long vm_assist;   /* VMASST_TYPE_* bitmap, now none on IPF */
+
+    cpu_user_regs_t regs;
+    arch_vcpu_info_t vcpu;
+    arch_shared_info_t shared;
 } vcpu_guest_context_t;
 
 #endif /* !__ASSEMBLY__ */
 
 #endif /* __HYPERVISOR_IF_IA64_H__ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 067b9aacb6c2 -r b3a255e88810 xen/include/public/arch-x86_32.h
--- a/xen/include/public/arch-x86_32.h  Wed Oct 12 09:11:35 2005
+++ b/xen/include/public/arch-x86_32.h  Wed Oct 12 10:07:37 2005
@@ -44,7 +44,6 @@
 /* And the trap vector is... */
 #define TRAP_INSTR "int $0x82"
 
-
 /*
  * Virtual addresses beyond this are not modifiable by guest OSes. The 
  * machine->physical mapping table starts at this address, read-only.
@@ -71,36 +70,36 @@
 #define TI_SET_DPL(_ti,_dpl) ((_ti)->flags |= (_dpl))
 #define TI_SET_IF(_ti,_if)   ((_ti)->flags |= ((!!(_if))<<2))
 typedef struct trap_info {
-    u8       vector;       /* exception vector                              */
-    u8       flags;        /* 0-3: privilege level; 4: clear event enable?  */
-    u16      cs;           /* code selector                                 */
+    uint8_t       vector;  /* exception vector                              */
+    uint8_t       flags;   /* 0-3: privilege level; 4: clear event enable?  */
+    uint16_t      cs;      /* code selector                                 */
     unsigned long address; /* code offset                                   */
 } trap_info_t;
 
 typedef struct cpu_user_regs {
-    u32 ebx;
-    u32 ecx;
-    u32 edx;
-    u32 esi;
-    u32 edi;
-    u32 ebp;
-    u32 eax;
-    u16 error_code;    /* private */
-    u16 entry_vector;  /* private */
-    u32 eip;
-    u16 cs;
-    u8  saved_upcall_mask;
-    u8  _pad0;
-    u32 eflags;
-    u32 esp;
-    u16 ss, _pad1;
-    u16 es, _pad2;
-    u16 ds, _pad3;
-    u16 fs, _pad4;
-    u16 gs, _pad5;
+    uint32_t ebx;
+    uint32_t ecx;
+    uint32_t edx;
+    uint32_t esi;
+    uint32_t edi;
+    uint32_t ebp;
+    uint32_t eax;
+    uint16_t error_code;    /* private */
+    uint16_t entry_vector;  /* private */
+    uint32_t eip;
+    uint16_t cs;
+    uint8_t  saved_upcall_mask;
+    uint8_t  _pad0;
+    uint32_t eflags;
+    uint32_t esp;
+    uint16_t ss, _pad1;
+    uint16_t es, _pad2;
+    uint16_t ds, _pad3;
+    uint16_t fs, _pad4;
+    uint16_t gs, _pad5;
 } cpu_user_regs_t;
 
-typedef u64 tsc_timestamp_t; /* RDTSC timestamp */
+typedef uint64_t tsc_timestamp_t; /* RDTSC timestamp */
 
 /*
  * The following is all CPU context. Note that the fpu_ctxt block is filled 
@@ -129,12 +128,20 @@
 
 typedef struct arch_shared_info {
     unsigned long max_pfn;                  /* max pfn that appears in table */
+    /* Frame containing list of mfns containing list of mfns containing p2m. */
     unsigned long pfn_to_mfn_frame_list_list; 
-                                            /* frame containing list of mfns
-                                              containing list of mfns 
-                                              containing the p2m table. */
 } arch_shared_info_t;
 
 #endif
 
 #endif
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 067b9aacb6c2 -r b3a255e88810 xen/include/public/arch-x86_64.h
--- a/xen/include/public/arch-x86_64.h  Wed Oct 12 09:11:35 2005
+++ b/xen/include/public/arch-x86_64.h  Wed Oct 12 10:07:37 2005
@@ -99,7 +99,7 @@
 #define VGCF_IN_SYSCALL (1<<8)
 struct switch_to_user {
     /* Top of stack (%rsp at point of hypercall). */
-    u64 rax, r11, rcx, flags, rip, cs, rflags, rsp, ss;
+    uint64_t rax, r11, rcx, flags, rip, cs, rflags, rsp, ss;
     /* Bottom of switch_to_user stack frame. */
 };
 
@@ -118,54 +118,54 @@
 #define TI_SET_DPL(_ti,_dpl) ((_ti)->flags |= (_dpl))
 #define TI_SET_IF(_ti,_if)   ((_ti)->flags |= ((!!(_if))<<2))
 typedef struct trap_info {
-    u8       vector;       /* exception vector                              */
-    u8       flags;        /* 0-3: privilege level; 4: clear event enable?  */
-    u16      cs;           /* code selector                                 */
+    uint8_t       vector;  /* exception vector                              */
+    uint8_t       flags;   /* 0-3: privilege level; 4: clear event enable?  */
+    uint16_t      cs;      /* code selector                                 */
     unsigned long address; /* code offset                                   */
 } trap_info_t;
 
 #ifdef __GNUC__
 /* Anonymous union includes both 32- and 64-bit names (e.g., eax/rax). */
-#define __DECL_REG(name) union { u64 r ## name, e ## name; }
+#define __DECL_REG(name) union { uint64_t r ## name, e ## name; }
 #else
 /* Non-gcc sources must always use the proper 64-bit name (e.g., rax). */
-#define __DECL_REG(name) u64 r ## name
+#define __DECL_REG(name) uint64_t r ## name
 #endif
 
 typedef struct cpu_user_regs {
-    u64 r15;
-    u64 r14;
-    u64 r13;
-    u64 r12;
+    uint64_t r15;
+    uint64_t r14;
+    uint64_t r13;
+    uint64_t r12;
     __DECL_REG(bp);
     __DECL_REG(bx);
-    u64 r11;
-    u64 r10;
-    u64 r9;
-    u64 r8;
+    uint64_t r11;
+    uint64_t r10;
+    uint64_t r9;
+    uint64_t r8;
     __DECL_REG(ax);
     __DECL_REG(cx);
     __DECL_REG(dx);
     __DECL_REG(si);
     __DECL_REG(di);
-    u32 error_code;    /* private */
-    u32 entry_vector;  /* private */
+    uint32_t error_code;    /* private */
+    uint32_t entry_vector;  /* private */
     __DECL_REG(ip);
-    u16 cs, _pad0[1];
-    u8  saved_upcall_mask;
-    u8  _pad1[3];
+    uint16_t cs, _pad0[1];
+    uint8_t  saved_upcall_mask;
+    uint8_t  _pad1[3];
     __DECL_REG(flags);
     __DECL_REG(sp);
-    u16 ss, _pad2[3];
-    u16 es, _pad3[3];
-    u16 ds, _pad4[3];
-    u16 fs, _pad5[3]; /* Non-zero => takes precedence over fs_base.      */
-    u16 gs, _pad6[3]; /* Non-zero => takes precedence over gs_base_user. */
+    uint16_t ss, _pad2[3];
+    uint16_t es, _pad3[3];
+    uint16_t ds, _pad4[3];
+    uint16_t fs, _pad5[3]; /* Non-zero => takes precedence over fs_base.     */
+    uint16_t gs, _pad6[3]; /* Non-zero => takes precedence over gs_base_usr. */
 } cpu_user_regs_t;
 
 #undef __DECL_REG
 
-typedef u64 tsc_timestamp_t; /* RDTSC timestamp */
+typedef uint64_t tsc_timestamp_t; /* RDTSC timestamp */
 
 /*
  * The following is all CPU context. Note that the fpu_ctxt block is filled 
@@ -190,19 +190,27 @@
     unsigned long syscall_callback_eip;
     unsigned long vm_assist;                /* VMASST_TYPE_* bitmap */
     /* Segment base addresses. */
-    u64           fs_base;
-    u64           gs_base_kernel;
-    u64           gs_base_user;
+    uint64_t      fs_base;
+    uint64_t      gs_base_kernel;
+    uint64_t      gs_base_user;
 } vcpu_guest_context_t;
 
 typedef struct arch_shared_info {
     unsigned long max_pfn;                  /* max pfn that appears in table */
+    /* Frame containing list of mfns containing list of mfns containing p2m. */
     unsigned long pfn_to_mfn_frame_list_list; 
-                                            /* frame containing list of mfns
-                                              containing list of mfns 
-                                              containing the p2m table. */
 } arch_shared_info_t;
 
 #endif /* !__ASSEMBLY__ */
 
 #endif
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 067b9aacb6c2 -r b3a255e88810 xen/include/public/dom0_ops.h
--- a/xen/include/public/dom0_ops.h     Wed Oct 12 09:11:35 2005
+++ b/xen/include/public/dom0_ops.h     Wed Oct 12 10:07:37 2005
@@ -44,7 +44,7 @@
 #define DOM0_CREATEDOMAIN      8
 typedef struct {
     /* IN parameters */
-    u32 ssidref;
+    uint32_t ssidref;
     /* IN/OUT parameters. */
     /* Identifier for new domain (auto-allocate if zero is specified). */
     domid_t domain;
@@ -53,7 +53,7 @@
 #define DOM0_DESTROYDOMAIN     9
 typedef struct {
     /* IN variables. */
-    domid_t      domain;
+    domid_t domain;
 } dom0_destroydomain_t;
 
 #define DOM0_PAUSEDOMAIN      10
@@ -82,22 +82,22 @@
 #define DOMFLAGS_CPUSHIFT       8
 #define DOMFLAGS_SHUTDOWNMASK 255 /* DOMFLAGS_SHUTDOWN guest-supplied code.  */
 #define DOMFLAGS_SHUTDOWNSHIFT 16
-    u32      flags;
+    uint32_t flags;
     unsigned long tot_pages;
     unsigned long max_pages;
     unsigned long shared_info_frame;       /* MFN of shared_info struct */
-    u64      cpu_time;
-    u32      n_vcpu;
-    s32      vcpu_to_cpu[MAX_VIRT_CPUS];  /* current mapping   */
+    uint64_t cpu_time;
+    uint32_t n_vcpu;
+    int32_t  vcpu_to_cpu[MAX_VIRT_CPUS];  /* current mapping   */
     cpumap_t cpumap[MAX_VIRT_CPUS];       /* allowable mapping */
-    u32             ssidref;
+    uint32_t ssidref;
 } dom0_getdomaininfo_t;
 
 #define DOM0_SETDOMAININFO      13
 typedef struct {
     /* IN variables. */
-    domid_t                   domain;
-    u16                       vcpu;
+    domid_t               domain;
+    uint16_t              vcpu;
     /* IN/OUT parameters */
     vcpu_guest_context_t *ctxt;
 } dom0_setdomaininfo_t;
@@ -105,29 +105,29 @@
 #define DOM0_MSR              15
 typedef struct {
     /* IN variables. */
-    u32 write;
-    u32 cpu_mask;
-    u32 msr;
-    u32 in1;
-    u32 in2;
-    /* OUT variables. */
-    u32 out1;
-    u32 out2;
+    uint32_t write;
+    uint32_t cpu_mask;
+    uint32_t msr;
+    uint32_t in1;
+    uint32_t in2;
+    /* OUT variables. */
+    uint32_t out1;
+    uint32_t out2;
 } dom0_msr_t;
 
 #define DOM0_DEBUG            16
 typedef struct {
     /* IN variables. */
-    domid_t domain;
-    u8  opcode;
-    u32 in1;
-    u32 in2;
-    u32 in3;
-    u32 in4;
-    /* OUT variables. */
-    u32 status;
-    u32 out1;
-    u32 out2;
+    domid_t  domain;
+    uint8_t  opcode;
+    uint32_t in1;
+    uint32_t in2;
+    uint32_t in3;
+    uint32_t in4;
+    /* OUT variables. */
+    uint32_t status;
+    uint32_t out1;
+    uint32_t out2;
 } dom0_debug_t;
 
 /*
@@ -137,9 +137,9 @@
 #define DOM0_SETTIME          17
 typedef struct {
     /* IN variables. */
-    u32 secs;
-    u32 nsecs;
-    u64 system_time;
+    uint32_t secs;
+    uint32_t nsecs;
+    uint64_t system_time;
 } dom0_settime_t;
 
 #define DOM0_GETPAGEFRAMEINFO 18
@@ -159,7 +159,7 @@
     domid_t domain;        /* To which domain does the frame belong?    */
     /* OUT variables. */
     /* Is the page PINNED to a type? */
-    u32 type;              /* see above type defs */
+    uint32_t type;              /* see above type defs */
 } dom0_getpageframeinfo_t;
 
 /*
@@ -168,10 +168,10 @@
 #define DOM0_READCONSOLE      19
 typedef struct {
     /* IN variables. */
-    u32      clear;        /* Non-zero -> clear after reading. */
+    uint32_t clear;        /* Non-zero -> clear after reading. */
     /* IN/OUT variables. */
     char    *buffer;       /* In: Buffer start; Out: Used buffer start */
-    u32      count;        /* In: Buffer size;  Out: Used buffer size  */
+    uint32_t count;        /* In: Buffer size;  Out: Used buffer size  */
 } dom0_readconsole_t;
 
 /* 
@@ -181,7 +181,7 @@
 typedef struct {
     /* IN variables. */
     domid_t      domain;
-    u16          vcpu;
+    uint16_t          vcpu;
     cpumap_t     *cpumap;
 } dom0_pincpudomain_t;
 
@@ -192,13 +192,13 @@
 #define DOM0_TBUF_GET_INFO     0
 #define DOM0_TBUF_SET_CPU_MASK 1
 #define DOM0_TBUF_SET_EVT_MASK 2
-    u8 op;
+    uint8_t op;
     /* IN/OUT variables */
     unsigned long cpu_mask;
-    u32           evt_mask;
+    uint32_t      evt_mask;
     /* OUT variables */
     unsigned long buffer_mfn;
-    u32      size;
+    uint32_t size;
 } dom0_tbufcontrol_t;
 
 /*
@@ -206,14 +206,14 @@
  */
 #define DOM0_PHYSINFO         22
 typedef struct {
-    u32      threads_per_core;
-    u32      cores_per_socket;
-    u32      sockets_per_node;
-    u32      nr_nodes;
-    u32      cpu_khz;
+    uint32_t threads_per_core;
+    uint32_t cores_per_socket;
+    uint32_t sockets_per_node;
+    uint32_t nr_nodes;
+    uint32_t cpu_khz;
     unsigned long total_pages;
     unsigned long free_pages;
-    u32      hw_cap[8];
+    uint32_t hw_cap[8];
 } dom0_physinfo_t;
 
 /*
@@ -222,7 +222,7 @@
 #define DOM0_SCHED_ID        24
 typedef struct {
     /* OUT variable */
-    u32 sched_id;
+    uint32_t sched_id;
 } dom0_sched_id_t;
 
 /* 
@@ -241,16 +241,16 @@
 
 typedef struct dom0_shadow_control
 {
-    u32 fault_count;
-    u32 dirty_count;
-    u32 dirty_net_count;     
-    u32 dirty_block_count;     
+    uint32_t fault_count;
+    uint32_t dirty_count;
+    uint32_t dirty_net_count;     
+    uint32_t dirty_block_count;     
 } dom0_shadow_control_stats_t;
 
 typedef struct {
     /* IN variables. */
     domid_t        domain;
-    u32            op;
+    uint32_t       op;
     unsigned long *dirty_bitmap; /* pointer to locked buffer */
     /* IN/OUT variables. */
     unsigned long  pages;        /* size of buffer, updated with actual size */
@@ -286,10 +286,10 @@
     /* IN variables. */
     unsigned long pfn;
     unsigned long nr_pfns;
-    u32           type;
-    /* OUT variables. */
-    u32           handle;
-    u32           reg;
+    uint32_t      type;
+    /* OUT variables. */
+    uint32_t      handle;
+    uint32_t      reg;
 } dom0_add_memtype_t;
 
 /*
@@ -302,19 +302,19 @@
 #define DOM0_DEL_MEMTYPE         32
 typedef struct {
     /* IN variables. */
-    u32      handle;
-    u32      reg;
+    uint32_t handle;
+    uint32_t reg;
 } dom0_del_memtype_t;
 
 /* Read current type of an MTRR (x86-specific). */
 #define DOM0_READ_MEMTYPE        33
 typedef struct {
     /* IN variables. */
-    u32      reg;
+    uint32_t reg;
     /* OUT variables. */
     unsigned long pfn;
     unsigned long nr_pfns;
-    u32      type;
+    uint32_t type;
 } dom0_read_memtype_t;
 
 /* Interface for controlling Xen software performance counters. */
@@ -323,39 +323,39 @@
 #define DOM0_PERFCCONTROL_OP_RESET 1   /* Reset all counters to zero. */
 #define DOM0_PERFCCONTROL_OP_QUERY 2   /* Get perfctr information. */
 typedef struct {
-    u8      name[80];               /*  name of perf counter */
-    u32     nr_vals;                /* number of values for this counter */
-    u32     vals[64];               /* array of values */
+    uint8_t      name[80];             /*  name of perf counter */
+    uint32_t     nr_vals;              /* number of values for this counter */
+    uint32_t     vals[64];             /* array of values */
 } dom0_perfc_desc_t;
 typedef struct {
     /* IN variables. */
-    u32            op;                /*  DOM0_PERFCCONTROL_OP_??? */
-    /* OUT variables. */
-    u32            nr_counters;       /*  number of counters */
+    uint32_t       op;                /*  DOM0_PERFCCONTROL_OP_??? */
+    /* OUT variables. */
+    uint32_t       nr_counters;       /*  number of counters */
     dom0_perfc_desc_t *desc;          /*  counter information (or NULL) */
 } dom0_perfccontrol_t;
 
 #define DOM0_MICROCODE           35
 typedef struct {
     /* IN variables. */
-    void   *data;                     /* Pointer to microcode data */
-    u32     length;                   /* Length of microcode data. */
+    void    *data;                    /* Pointer to microcode data */
+    uint32_t length;                  /* Length of microcode data. */
 } dom0_microcode_t;
 
 #define DOM0_IOPORT_PERMISSION   36
 typedef struct {
-    domid_t domain;                   /* domain to be affected */
-    u16     first_port;               /* first port int range */
-    u16     nr_ports;                 /* size of port range */
-    u16     allow_access;             /* allow or deny access to range? */
+    domid_t  domain;                  /* domain to be affected */
+    uint16_t first_port;              /* first port int range */
+    uint16_t nr_ports;                /* size of port range */
+    uint16_t allow_access;            /* allow or deny access to range? */
 } dom0_ioport_permission_t;
 
 #define DOM0_GETVCPUCONTEXT      37
 typedef struct {
-    domid_t domain;                   /* domain to be affected */
-    u16     vcpu;                     /* vcpu # */
+    domid_t  domain;                  /* domain to be affected */
+    uint16_t vcpu;                    /* vcpu # */
     vcpu_guest_context_t *ctxt;       /* NB. IN/OUT variable. */
-    u64     cpu_time;                 
+    uint64_t cpu_time;                 
 } dom0_getvcpucontext_t;
 
 #define DOM0_GETDOMAININFOLIST   38
@@ -382,14 +382,14 @@
     /* OUT variables. */
     int nr_map_entries;
     struct dom0_memory_map_entry {
-        u64 start, end;
+        uint64_t start, end;
         int is_ram;
     } *memory_map;
 } dom0_physical_memory_map_t;
 
 typedef struct {
-    u32 cmd;
-    u32 interface_version; /* DOM0_INTERFACE_VERSION */
+    uint32_t cmd;
+    uint32_t interface_version; /* DOM0_INTERFACE_VERSION */
     union {
         dom0_createdomain_t      createdomain;
         dom0_pausedomain_t       pausedomain;
@@ -426,3 +426,13 @@
 } dom0_op_t;
 
 #endif /* __XEN_PUBLIC_DOM0_OPS_H__ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 067b9aacb6c2 -r b3a255e88810 xen/include/public/event_channel.h
--- a/xen/include/public/event_channel.h        Wed Oct 12 09:11:35 2005
+++ b/xen/include/public/event_channel.h        Wed Oct 12 10:07:37 2005
@@ -19,9 +19,9 @@
 #define EVTCHNOP_alloc_unbound    6
 typedef struct evtchn_alloc_unbound {
     /* IN parameters */
-    domid_t dom, remote_dom;
+    domid_t  dom, remote_dom;
     /* OUT parameters */
-    u32     port;
+    uint32_t port;
 } evtchn_alloc_unbound_t;
 
 /*
@@ -34,10 +34,10 @@
 #define EVTCHNOP_bind_interdomain 0
 typedef struct evtchn_bind_interdomain {
     /* IN parameters. */
-    domid_t remote_dom;
-    u32     remote_port;
+    domid_t  remote_dom;
+    uint32_t remote_port;
     /* OUT parameters. */
-    u32     local_port;
+    uint32_t local_port;
 } evtchn_bind_interdomain_t;
 
 /*
@@ -51,10 +51,10 @@
 #define EVTCHNOP_bind_virq        1
 typedef struct evtchn_bind_virq {
     /* IN parameters. */
-    u32 virq;
-    u32 vcpu;
+    uint32_t virq;
+    uint32_t vcpu;
     /* OUT parameters. */
-    u32 port;
+    uint32_t port;
 } evtchn_bind_virq_t;
 
 /*
@@ -66,11 +66,11 @@
 #define EVTCHNOP_bind_pirq        2
 typedef struct evtchn_bind_pirq {
     /* IN parameters. */
-    u32 pirq;
+    uint32_t pirq;
 #define BIND_PIRQ__WILL_SHARE 1
-    u32 flags; /* BIND_PIRQ__* */
+    uint32_t flags; /* BIND_PIRQ__* */
     /* OUT parameters. */
-    u32 port;
+    uint32_t port;
 } evtchn_bind_pirq_t;
 
 /*
@@ -81,9 +81,9 @@
  */
 #define EVTCHNOP_bind_ipi         7
 typedef struct evtchn_bind_ipi {
-    u32 vcpu;
+    uint32_t vcpu;
     /* OUT parameters. */
-    u32 port;
+    uint32_t port;
 } evtchn_bind_ipi_t;
 
 /*
@@ -94,7 +94,7 @@
 #define EVTCHNOP_close            3
 typedef struct evtchn_close {
     /* IN parameters. */
-    u32 port;
+    uint32_t port;
 } evtchn_close_t;
 
 /*
@@ -104,7 +104,7 @@
 #define EVTCHNOP_send             4
 typedef struct evtchn_send {
     /* IN parameters. */
-    u32 port;
+    uint32_t port;
 } evtchn_send_t;
 
 /*
@@ -118,8 +118,8 @@
 #define EVTCHNOP_status           5
 typedef struct evtchn_status {
     /* IN parameters */
-    domid_t dom;
-    u32     port;
+    domid_t  dom;
+    uint32_t port;
     /* OUT parameters */
 #define EVTCHNSTAT_closed       0  /* Channel is not in use.                 */
 #define EVTCHNSTAT_unbound      1  /* Channel is waiting interdom connection.*/
@@ -127,18 +127,18 @@
 #define EVTCHNSTAT_pirq         3  /* Channel is bound to a phys IRQ line.   */
 #define EVTCHNSTAT_virq         4  /* Channel is bound to a virtual IRQ line */
 #define EVTCHNSTAT_ipi          5  /* Channel is bound to a virtual IPI line */
-    u32     status;
-    u32     vcpu;                  /* VCPU to which this channel is bound.   */
+    uint32_t status;
+    uint32_t vcpu;                 /* VCPU to which this channel is bound.   */
     union {
         struct {
-            domid_t dom;
+            domid_t  dom;
         } unbound; /* EVTCHNSTAT_unbound */
         struct {
-            domid_t dom;
-            u32     port;
+            domid_t  dom;
+            uint32_t port;
         } interdomain; /* EVTCHNSTAT_interdomain */
-        u32 pirq;      /* EVTCHNSTAT_pirq        */
-        u32 virq;      /* EVTCHNSTAT_virq        */
+        uint32_t pirq;      /* EVTCHNSTAT_pirq        */
+        uint32_t virq;      /* EVTCHNSTAT_virq        */
     } u;
 } evtchn_status_t;
 
@@ -155,12 +155,12 @@
 #define EVTCHNOP_bind_vcpu        8
 typedef struct evtchn_bind_vcpu {
     /* IN parameters. */
-    u32 port;
-    u32 vcpu;
+    uint32_t port;
+    uint32_t vcpu;
 } evtchn_bind_vcpu_t;
 
 typedef struct evtchn_op {
-    u32 cmd; /* EVTCHNOP_* */
+    uint32_t cmd; /* EVTCHNOP_* */
     union {
         evtchn_alloc_unbound_t    alloc_unbound;
         evtchn_bind_interdomain_t bind_interdomain;
@@ -175,3 +175,13 @@
 } evtchn_op_t;
 
 #endif /* __XEN_PUBLIC_EVENT_CHANNEL_H__ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 067b9aacb6c2 -r b3a255e88810 xen/include/public/grant_table.h
--- a/xen/include/public/grant_table.h  Wed Oct 12 09:11:35 2005
+++ b/xen/include/public/grant_table.h  Wed Oct 12 10:07:37 2005
@@ -73,14 +73,14 @@
  */
 typedef struct grant_entry {
     /* GTF_xxx: various type and flag information.  [XEN,GST] */
-    u16     flags;
+    uint16_t     flags;
     /* The domain being granted foreign privileges. [GST] */
     domid_t domid;
     /*
      * GTF_permit_access: Frame that @domid is allowed to map and access. [GST]
      * GTF_accept_transfer: Frame whose ownership transferred by @domid. [XEN]
      */
-    u32     frame;
+    uint32_t     frame;
 } grant_entry_t;
 
 /*
@@ -131,7 +131,7 @@
 /*
  * Reference to a grant entry in a specified domain's grant table.
  */
-typedef u16 grant_ref_t;
+typedef uint16_t grant_ref_t;
 
 /*
  * GNTTABOP_map_grant_ref: Map the grant entry (<dom>,<ref>) for access
@@ -153,13 +153,13 @@
 #define GNTTABOP_map_grant_ref        0
 typedef struct gnttab_map_grant_ref {
     /* IN parameters. */
-    u64         host_addr;
-    domid_t     dom;
+    uint64_t host_addr;
+    domid_t  dom;
     grant_ref_t ref;
-    u16         flags;                /* GNTMAP_* */
-    /* OUT parameters. */
-    s16         handle;               /* +ve: handle; -ve: GNTST_* */
-    u64         dev_bus_addr;
+    uint16_t flags;               /* GNTMAP_* */
+    /* OUT parameters. */
+    int16_t  handle;              /* +ve: handle; -ve: GNTST_* */
+    uint64_t dev_bus_addr;
 } gnttab_map_grant_ref_t;
 
 /*
@@ -176,11 +176,11 @@
 #define GNTTABOP_unmap_grant_ref      1
 typedef struct gnttab_unmap_grant_ref {
     /* IN parameters. */
-    u64         host_addr;
-    u64         dev_bus_addr;
-    u16         handle;
-    /* OUT parameters. */
-    s16         status;               /* GNTST_* */
+    uint64_t host_addr;
+    uint64_t dev_bus_addr;
+    uint16_t handle;
+    /* OUT parameters. */
+    int16_t  status;              /* GNTST_* */
 } gnttab_unmap_grant_ref_t;
 
 /*
@@ -195,10 +195,10 @@
 #define GNTTABOP_setup_table          2
 typedef struct gnttab_setup_table {
     /* IN parameters. */
-    domid_t     dom;
-    u16         nr_frames;
-    /* OUT parameters. */
-    s16         status;               /* GNTST_* */
+    domid_t  dom;
+    uint16_t nr_frames;
+    /* OUT parameters. */
+    int16_t  status;              /* GNTST_* */
     unsigned long *frame_list;
 } gnttab_setup_table_t;
 
@@ -209,9 +209,9 @@
 #define GNTTABOP_dump_table           3
 typedef struct gnttab_dump_table {
     /* IN parameters. */
-    domid_t     dom;
-    /* OUT parameters. */
-    s16         status;               /* GNTST_* */
+    domid_t dom;
+    /* OUT parameters. */
+    int16_t status;               /* GNTST_* */
 } gnttab_dump_table_t;
 
 /*
@@ -223,10 +223,10 @@
 typedef struct {
     /* IN parameters. */
     unsigned long mfn;
-    domid_t     domid;
-    grant_ref_t ref;
-    /* OUT parameters. */
-    s16         status;
+    domid_t       domid;
+    grant_ref_t   ref;
+    /* OUT parameters. */
+    int16_t       status;
 } gnttab_transfer_t;
 
 /*
@@ -283,3 +283,13 @@
 }
 
 #endif /* __XEN_PUBLIC_GRANT_TABLE_H__ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 067b9aacb6c2 -r b3a255e88810 xen/include/public/io/blkif.h
--- a/xen/include/public/io/blkif.h     Wed Oct 12 09:11:35 2005
+++ b/xen/include/public/io/blkif.h     Wed Oct 12 10:07:37 2005
@@ -12,9 +12,9 @@
 #include "ring.h"
 
 #ifndef blkif_vdev_t
-#define blkif_vdev_t   u16
+#define blkif_vdev_t   uint16_t
 #endif
-#define blkif_sector_t u64
+#define blkif_sector_t uint64_t
 
 #define BLKIF_OP_READ      0
 #define BLKIF_OP_WRITE     1
@@ -30,8 +30,8 @@
 #define BLKIF_MAX_SEGMENTS_PER_REQUEST 11
 
 typedef struct blkif_request {
-    u8             operation;    /* BLKIF_OP_???                         */
-    u8             nr_segments;  /* number of segments                   */
+    uint8_t        operation;    /* BLKIF_OP_???                         */
+    uint8_t        nr_segments;  /* number of segments                   */
     blkif_vdev_t   handle;       /* only for read/write requests         */
     unsigned long  id;           /* private guest value, echoed in resp  */
     blkif_sector_t sector_number;/* start sector idx on disk (r/w only)  */
@@ -51,8 +51,8 @@
 
 typedef struct blkif_response {
     unsigned long   id;              /* copied from request */
-    u8              operation;       /* copied from request */
-    s16             status;          /* BLKIF_RSP_???       */
+    uint8_t         operation;       /* copied from request */
+    int16_t         status;          /* BLKIF_RSP_???       */
 } blkif_response_t;
 
 #define BLKIF_RSP_ERROR  -1 /* non-specific 'error' */
@@ -72,3 +72,13 @@
 #define VDISK_READONLY     0x4
 
 #endif /* __XEN_PUBLIC_IO_BLKIF_H__ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 067b9aacb6c2 -r b3a255e88810 xen/include/public/io/console.h
--- a/xen/include/public/io/console.h   Wed Oct 12 09:11:35 2005
+++ b/xen/include/public/io/console.h   Wed Oct 12 10:07:37 2005
@@ -9,7 +9,7 @@
 #ifndef __XEN_PUBLIC_IO_CONSOLE_H__
 #define __XEN_PUBLIC_IO_CONSOLE_H__
 
-typedef u32 XENCONS_RING_IDX;
+typedef uint32_t XENCONS_RING_IDX;
 
 #define MASK_XENCONS_IDX(idx, ring) ((idx) & (sizeof(ring)-1))
 
@@ -21,3 +21,13 @@
 };
 
 #endif /* __XEN_PUBLIC_IO_CONSOLE_H__ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 067b9aacb6c2 -r b3a255e88810 xen/include/public/io/ioreq.h
--- a/xen/include/public/io/ioreq.h     Wed Oct 12 09:11:35 2005
+++ b/xen/include/public/io/ioreq.h     Wed Oct 12 10:07:37 2005
@@ -29,11 +29,11 @@
 #define STATE_IORESP_READY      3
 #define STATE_IORESP_HOOK       4
 
-#define IOREQ_TYPE_PIO         0       /* pio */
-#define IOREQ_TYPE_COPY                1       /* mmio ops */
-#define IOREQ_TYPE_AND         2
-#define IOREQ_TYPE_OR          3
-#define IOREQ_TYPE_XOR         4
+#define IOREQ_TYPE_PIO  0 /* pio */
+#define IOREQ_TYPE_COPY  1 /* mmio ops */
+#define IOREQ_TYPE_AND  2
+#define IOREQ_TYPE_OR  3
+#define IOREQ_TYPE_XOR  4
 
 /*
  * VMExit dispatcher should cooperate with instruction decoder to
@@ -41,38 +41,48 @@
  * virq 
  */
 typedef struct {
-    u64     addr;               /*  physical address            */
-    u64     size;               /*  size in bytes               */
-    u64     count;             /*  for rep prefixes            */
+    uint64_t addr;   /*  physical address            */
+    uint64_t size;   /*  size in bytes               */
+    uint64_t count;  /*  for rep prefixes            */
     union {
-        u64     data;           /*  data                        */
-        void    *pdata;         /*  pointer to data             */
+        uint64_t data;           /*  data                        */
+        void    *pdata;          /*  pointer to data             */
     } u;
-    u8      state:4;
-    u8      pdata_valid:1;     /* if 1, use pdata above        */
-    u8      dir:1;             /*  1=read, 0=write             */
-    u8      df:1;
-    u8      type;              /* I/O type                     */
+    uint8_t state:4;
+    uint8_t pdata_valid:1; /* if 1, use pdata above  */
+    uint8_t dir:1;   /*  1=read, 0=write             */
+    uint8_t df:1;
+    uint8_t type;    /* I/O type                     */
 } ioreq_t;
 
 #define MAX_VECTOR    256
 #define BITS_PER_BYTE   8
-#define INTR_LEN        (MAX_VECTOR/(BITS_PER_BYTE * sizeof(u64)))
+#define INTR_LEN        (MAX_VECTOR/(BITS_PER_BYTE * sizeof(uint64_t)))
 
 typedef struct {
-    u64   pic_intr[INTR_LEN];
-    u64   pic_mask[INTR_LEN];
-    int     eport; /* Event channel port */
+    uint64_t pic_intr[INTR_LEN];
+    uint64_t pic_mask[INTR_LEN];
+    int      eport; /* Event channel port */
 } global_iodata_t;
 
 typedef struct {
-    ioreq_t         vp_ioreq;
-    unsigned long   vp_intr[INTR_LEN];
+    ioreq_t       vp_ioreq;
+    unsigned long vp_intr[INTR_LEN];
 } vcpu_iodata_t;
 
 typedef struct {
-    global_iodata_t     sp_global;
-    vcpu_iodata_t       vcpu_iodata[1];
+    global_iodata_t sp_global;
+    vcpu_iodata_t   vcpu_iodata[1];
 } shared_iopage_t;
 
 #endif /* _IOREQ_H_ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 067b9aacb6c2 -r b3a255e88810 xen/include/public/io/netif.h
--- a/xen/include/public/io/netif.h     Wed Oct 12 09:11:35 2005
+++ b/xen/include/public/io/netif.h     Wed Oct 12 10:07:37 2005
@@ -11,34 +11,34 @@
 
 typedef struct netif_tx_request {
     grant_ref_t gref;      /* Reference to buffer page */
-    u16      offset:15;    /* Offset within buffer page */
-    u16      csum_blank:1; /* Proto csum field blank?   */
-    u16      id;           /* Echoed in response message. */
-    u16      size;         /* Packet size in bytes.       */
+    uint16_t offset:15;    /* Offset within buffer page */
+    uint16_t csum_blank:1; /* Proto csum field blank?   */
+    uint16_t id;           /* Echoed in response message. */
+    uint16_t size;         /* Packet size in bytes.       */
 } netif_tx_request_t;
 
 typedef struct netif_tx_response {
-    u16      id;
-    s8       status;
+    uint16_t id;
+    int8_t   status;
 } netif_tx_response_t;
 
 typedef struct {
-    u16       id;       /* Echoed in response message.        */
-    grant_ref_t gref;  /* Reference to incoming granted frame */
+    uint16_t    id;        /* Echoed in response message.        */
+    grant_ref_t gref;      /* Reference to incoming granted frame */
 } netif_rx_request_t;
 
 typedef struct {
-    u16      offset;     /* Offset in page of start of received packet  */
-    u16      csum_valid; /* Protocol checksum is validated?       */
-    u16      id;
-    s16      status;     /* -ve: BLKIF_RSP_* ; +ve: Rx'ed pkt size. */
+    uint16_t offset;     /* Offset in page of start of received packet  */
+    uint16_t csum_valid; /* Protocol checksum is validated?       */
+    uint16_t id;
+    int16_t  status;     /* -ve: BLKIF_RSP_* ; +ve: Rx'ed pkt size. */
 } netif_rx_response_t;
 
 /*
  * We use a special capitalised type name because it is _essential_ that all 
  * arithmetic on indexes is done on an integer type of the correct size.
  */
-typedef u32 NETIF_RING_IDX;
+typedef uint32_t NETIF_RING_IDX;
 
 /*
  * Ring indexes are 'free running'. That is, they are not stored modulo the
@@ -91,3 +91,13 @@
 #define NETIF_RSP_OKAY             0
 
 #endif
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 067b9aacb6c2 -r b3a255e88810 xen/include/public/io/ring.h
--- a/xen/include/public/io/ring.h      Wed Oct 12 09:11:35 2005
+++ b/xen/include/public/io/ring.h      Wed Oct 12 10:07:37 2005
@@ -197,3 +197,13 @@
     (((_cons) - (_r)->rsp_prod_pvt) >= RING_SIZE(_r))
 
 #endif /* __XEN_PUBLIC_IO_RING_H__ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 067b9aacb6c2 -r b3a255e88810 xen/include/public/io/tpmif.h
--- a/xen/include/public/io/tpmif.h     Wed Oct 12 09:11:35 2005
+++ b/xen/include/public/io/tpmif.h     Wed Oct 12 10:07:37 2005
@@ -19,15 +19,15 @@
 typedef struct {
     unsigned long addr;   /* Machine address of packet.   */
     int      ref;         /* grant table access reference */
-    u16      id;          /* Echoed in response message.  */
-    u16      size;        /* Packet size in bytes.        */
+    uint16_t id;          /* Echoed in response message.  */
+    uint16_t size;        /* Packet size in bytes.        */
 } tpmif_tx_request_t;
 
 /*
  * The TPMIF_TX_RING_SIZE defines the number of pages the
  * front-end and backend can exchange (= size of array).
  */
-typedef u32 TPMIF_RING_IDX;
+typedef uint32_t TPMIF_RING_IDX;
 
 #define TPMIF_TX_RING_SIZE 10
 
@@ -42,3 +42,13 @@
 } tpmif_tx_interface_t;
 
 #endif
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 067b9aacb6c2 -r b3a255e88810 xen/include/public/io/vmx_vlapic.h
--- a/xen/include/public/io/vmx_vlapic.h        Wed Oct 12 09:11:35 2005
+++ b/xen/include/public/io/vmx_vlapic.h        Wed Oct 12 10:07:37 2005
@@ -25,33 +25,43 @@
 #define VL_STATE_EOI_LOCK   3
 
 #define VLOCAL_APIC_MAX_INTS             256
-#define VLAPIC_INT_COUNT                (VLOCAL_APIC_MAX_INTS/(BITS_PER_BYTE * 
sizeof(u64)))
-#define VLAPIC_INT_COUNT_32             (VLOCAL_APIC_MAX_INTS/(BITS_PER_BYTE * 
sizeof(u32)))
+#define VLAPIC_INT_COUNT                (VLOCAL_APIC_MAX_INTS/(BITS_PER_BYTE * 
sizeof(uint64_t)))
+#define VLAPIC_INT_COUNT_32             (VLOCAL_APIC_MAX_INTS/(BITS_PER_BYTE * 
sizeof(uint32_t)))
 
 struct vapic_bus_message{
-   u8   deliv_mode:4;   /* deliver mode, including fixed, LPRI, etc */
-   u8   level:1;        /* level or edge */
-   u8   trig_mod:1;    /* assert or disassert */
-   u8   reserved:2;
-   u8   vector;
+   uint8_t   deliv_mode:4;   /* deliver mode, including fixed, LPRI, etc */
+   uint8_t   level:1;        /* level or edge */
+   uint8_t   trig_mod:1;    /* assert or disassert */
+   uint8_t   reserved:2;
+   uint8_t   vector;
 };
 
 typedef struct {
     /* interrupt for PIC and ext type IOAPIC interrupt */
-    u64   vl_ext_intr[VLAPIC_INT_COUNT];
-    u64   vl_ext_intr_mask[VLAPIC_INT_COUNT];
-    u64   vl_apic_intr[VLAPIC_INT_COUNT];
-    u64   vl_apic_tmr[VLAPIC_INT_COUNT];
-    u64   vl_eoi[VLAPIC_INT_COUNT];
-    u32   vl_lapic_id;
-    u32   direct_intr;
-    u32   vl_apr;
-    u32   vl_logical_dest;
-    u32   vl_dest_format;
-    u32   vl_arb_id;
-    u32   vl_state;
-    u32   apic_msg_count;
+    uint64_t   vl_ext_intr[VLAPIC_INT_COUNT];
+    uint64_t   vl_ext_intr_mask[VLAPIC_INT_COUNT];
+    uint64_t   vl_apic_intr[VLAPIC_INT_COUNT];
+    uint64_t   vl_apic_tmr[VLAPIC_INT_COUNT];
+    uint64_t   vl_eoi[VLAPIC_INT_COUNT];
+    uint32_t   vl_lapic_id;
+    uint32_t   direct_intr;
+    uint32_t   vl_apr;
+    uint32_t   vl_logical_dest;
+    uint32_t   vl_dest_format;
+    uint32_t   vl_arb_id;
+    uint32_t   vl_state;
+    uint32_t   apic_msg_count;
     struct vapic_bus_message  vl_apic_msg[24];
 } vlapic_info;
 
 #endif /* _VMX_VLAPIC_H_ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 067b9aacb6c2 -r b3a255e88810 xen/include/public/io/xs_wire.h
--- a/xen/include/public/io/xs_wire.h   Wed Oct 12 09:11:35 2005
+++ b/xen/include/public/io/xs_wire.h   Wed Oct 12 10:07:37 2005
@@ -76,12 +76,13 @@
     XSD_ERROR(EAGAIN),
     XSD_ERROR(EISCONN),
 };
+
 struct xsd_sockmsg
 {
-    u32 type;  /* XS_??? */
-    u32 req_id;/* Request identifier, echoed in daemon's response.  */
-    u32 tx_id; /* Transaction id (0 if not related to a transaction). */
-    u32 len;   /* Length of data following this. */
+    uint32_t type;  /* XS_??? */
+    uint32_t req_id;/* Request identifier, echoed in daemon's response.  */
+    uint32_t tx_id; /* Transaction id (0 if not related to a transaction). */
+    uint32_t len;   /* Length of data following this. */
 
     /* Generally followed by nul-terminated string(s). */
 };
@@ -93,3 +94,13 @@
 };
 
 #endif /* _XS_WIRE_H */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 067b9aacb6c2 -r b3a255e88810 xen/include/public/memory.h
--- a/xen/include/public/memory.h       Wed Oct 12 09:11:35 2005
+++ b/xen/include/public/memory.h       Wed Oct 12 10:07:37 2005
@@ -48,3 +48,13 @@
 } xen_memory_reservation_t;
 
 #endif /* __XEN_PUBLIC_MEMORY_H__ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 067b9aacb6c2 -r b3a255e88810 xen/include/public/physdev.h
--- a/xen/include/public/physdev.h      Wed Oct 12 09:11:35 2005
+++ b/xen/include/public/physdev.h      Wed Oct 12 10:07:37 2005
@@ -13,41 +13,41 @@
 
 typedef struct physdevop_irq_status_query {
     /* IN */
-    u32 irq;
+    uint32_t irq;
     /* OUT */
 /* Need to call PHYSDEVOP_IRQ_UNMASK_NOTIFY when the IRQ has been serviced? */
 #define PHYSDEVOP_IRQ_NEEDS_UNMASK_NOTIFY (1<<0)
-    u32 flags;
+    uint32_t flags;
 } physdevop_irq_status_query_t;
 
 typedef struct physdevop_set_iopl {
     /* IN */
-    u32 iopl;
+    uint32_t iopl;
 } physdevop_set_iopl_t;
 
 typedef struct physdevop_set_iobitmap {
     /* IN */
-    u8 *bitmap;
-    u32 nr_ports;
+    uint8_t *bitmap;
+    uint32_t nr_ports;
 } physdevop_set_iobitmap_t;
 
 typedef struct physdevop_apic {
     /* IN */
-    u32 apic;
-    u32 offset;
+    uint32_t apic;
+    uint32_t offset;
     /* IN or OUT */
-    u32 value;
+    uint32_t value;
 } physdevop_apic_t; 
 
 typedef struct physdevop_irq {
     /* IN */
-    u32 irq;
+    uint32_t irq;
     /* OUT */
-    u32 vector;
+    uint32_t vector;
 } physdevop_irq_t; 
 
 typedef struct physdev_op {
-    u32 cmd;
+    uint32_t cmd;
     union {
         physdevop_irq_status_query_t      irq_status_query;
         physdevop_set_iopl_t              set_iopl;
diff -r 067b9aacb6c2 -r b3a255e88810 xen/include/public/sched.h
--- a/xen/include/public/sched.h        Wed Oct 12 09:11:35 2005
+++ b/xen/include/public/sched.h        Wed Oct 12 10:07:37 2005
@@ -48,3 +48,13 @@
 #define SHUTDOWN_crash      3  /* Tell controller we've crashed.             */
 
 #endif /* __XEN_PUBLIC_SCHED_H__ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 067b9aacb6c2 -r b3a255e88810 xen/include/public/sched_ctl.h
--- a/xen/include/public/sched_ctl.h    Wed Oct 12 09:11:35 2005
+++ b/xen/include/public/sched_ctl.h    Wed Oct 12 10:07:37 2005
@@ -20,39 +20,49 @@
  * parameters
  */
 struct sched_ctl_cmd {
-    u32 sched_id;
-    u32 direction;
+    uint32_t sched_id;
+    uint32_t direction;
     union {
         struct bvt_ctl {
-            u32 ctx_allow;
+            uint32_t ctx_allow;
         } bvt;
     } u;
 };
 
 struct sched_adjdom_cmd {
-    u32     sched_id;
-    u32     direction;
-    domid_t domain;
+    uint32_t sched_id;
+    uint32_t direction;
+    domid_t  domain;
     union {
         struct bvt_adjdom
         {
-            u32 mcu_adv;            /* mcu advance: inverse of weight */
-            u32 warpback;           /* warp? */
-            s32 warpvalue;          /* warp value */
-            long long warpl;        /* warp limit */
-            long long warpu;        /* unwarp time requirement */
+            uint32_t mcu_adv;      /* mcu advance: inverse of weight */
+            uint32_t warpback;     /* warp? */
+            int32_t  warpvalue;    /* warp value */
+            int64_t  warpl;        /* warp limit */
+            int64_t  warpu;        /* unwarp time requirement */
         } bvt;
         
-       struct sedf_adjdom
+        struct sedf_adjdom
         {
-            u64 period;
-            u64 slice;
-            u64 latency;
-            u16 extratime;
-           u16 weight;
+            uint64_t period;
+            uint64_t slice;
+            uint64_t latency;
+            uint16_t extratime;
+            uint16_t weight;
         } sedf;
 
     } u;
 };
 
 #endif /* __XEN_PUBLIC_SCHED_CTL_H__ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 067b9aacb6c2 -r b3a255e88810 xen/include/public/trace.h
--- a/xen/include/public/trace.h        Wed Oct 12 09:11:35 2005
+++ b/xen/include/public/trace.h        Wed Oct 12 10:07:37 2005
@@ -55,8 +55,8 @@
 
 /* This structure represents a single trace buffer record. */
 struct t_rec {
-    u64 cycles;               /* cycle counter timestamp */
-    u32 event;                /* event ID                */
+    uint64_t cycles;          /* cycle counter timestamp */
+    uint32_t event;           /* event ID                */
     unsigned long data[5];    /* event data items        */
 };
 
@@ -75,3 +75,13 @@
 };
 
 #endif /* __XEN_PUBLIC_TRACE_H__ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 067b9aacb6c2 -r b3a255e88810 xen/include/public/vcpu.h
--- a/xen/include/public/vcpu.h Wed Oct 12 09:11:35 2005
+++ b/xen/include/public/vcpu.h Wed Oct 12 10:07:37 2005
@@ -52,3 +52,13 @@
 #define VCPUOP_is_up                3
 
 #endif /* __XEN_PUBLIC_VCPU_H__ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 067b9aacb6c2 -r b3a255e88810 xen/include/public/version.h
--- a/xen/include/public/version.h      Wed Oct 12 09:11:35 2005
+++ b/xen/include/public/version.h      Wed Oct 12 10:07:37 2005
@@ -40,3 +40,13 @@
 } xen_parameters_info_t;
 
 #endif /* __XEN_PUBLIC_VERSION_H__ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 067b9aacb6c2 -r b3a255e88810 xen/include/public/vmx_assist.h
--- a/xen/include/public/vmx_assist.h   Wed Oct 12 09:11:35 2005
+++ b/xen/include/public/vmx_assist.h   Wed Oct 12 10:07:37 2005
@@ -21,81 +21,90 @@
 #ifndef _VMX_ASSIST_H_
 #define _VMX_ASSIST_H_
 
-#define        VMXASSIST_BASE          0xD0000
-#define        VMXASSIST_MAGIC         0x17101966
-#define        VMXASSIST_MAGIC_OFFSET  (VMXASSIST_BASE+8)
+#define VMXASSIST_BASE         0xD0000
+#define VMXASSIST_MAGIC        0x17101966
+#define VMXASSIST_MAGIC_OFFSET (VMXASSIST_BASE+8)
 
-#define        VMXASSIST_NEW_CONTEXT   (VMXASSIST_BASE + 12)
-#define        VMXASSIST_OLD_CONTEXT   (VMXASSIST_NEW_CONTEXT + 4)
+#define VMXASSIST_NEW_CONTEXT (VMXASSIST_BASE + 12)
+#define VMXASSIST_OLD_CONTEXT (VMXASSIST_NEW_CONTEXT + 4)
 
 #ifndef __ASSEMBLY__
 
 union vmcs_arbytes {
-       struct arbyte_fields {
-               unsigned int    seg_type        : 4,
-                               s               : 1,
-                               dpl             : 2,
-                               p               : 1, 
-                               reserved0       : 4,
-                               avl             : 1,
-                               reserved1       : 1,     
-                               default_ops_size: 1,
-                               g               : 1,
-                               null_bit        : 1, 
-                               reserved2       : 15;
-       } fields;
-       unsigned int bytes;
+    struct arbyte_fields {
+        unsigned int seg_type : 4,
+            s         : 1,
+            dpl       : 2,
+            p         : 1, 
+            reserved0 : 4,
+            avl       : 1,
+            reserved1 : 1,     
+            default_ops_size: 1,
+            g         : 1,
+            null_bit  : 1, 
+            reserved2 : 15;
+    } fields;
+    unsigned int bytes;
 };
 
 /*
  * World switch state
  */
 typedef struct vmx_assist_context {
-       u32             eip;            /* execution pointer */
-       u32             esp;            /* stack point */
-       u32             eflags;         /* flags register */
-       u32             cr0;
-       u32             cr3;            /* page table directory */
-       u32             cr4;
-       u32             idtr_limit;     /* idt */
-       u32             idtr_base;
-       u32             gdtr_limit;     /* gdt */
-       u32             gdtr_base;
-       u32             cs_sel;         /* cs selector */
-       u32             cs_limit;
-       u32             cs_base;
-       union vmcs_arbytes      cs_arbytes;
-       u32             ds_sel;         /* ds selector */
-       u32             ds_limit;
-       u32             ds_base;
-       union vmcs_arbytes      ds_arbytes;
-       u32             es_sel;         /* es selector */
-       u32             es_limit;
-       u32             es_base;
-       union vmcs_arbytes      es_arbytes;
-       u32             ss_sel;         /* ss selector */
-       u32             ss_limit;
-       u32             ss_base;
-       union vmcs_arbytes      ss_arbytes;
-       u32             fs_sel;         /* fs selector */
-       u32             fs_limit;
-       u32             fs_base;
-       union vmcs_arbytes      fs_arbytes;
-       u32             gs_sel;         /* gs selector */
-       u32             gs_limit;
-       u32             gs_base;
-       union vmcs_arbytes      gs_arbytes;
-       u32             tr_sel;         /* task selector */
-       u32             tr_limit;
-       u32             tr_base;
-       union vmcs_arbytes      tr_arbytes;
-       u32             ldtr_sel;       /* ldtr selector */
-       u32             ldtr_limit;
-       u32             ldtr_base;
-       union vmcs_arbytes      ldtr_arbytes;
+    uint32_t  eip;        /* execution pointer */
+    uint32_t  esp;        /* stack pointer */
+    uint32_t  eflags;     /* flags register */
+    uint32_t  cr0;
+    uint32_t  cr3;        /* page table directory */
+    uint32_t  cr4;
+    uint32_t  idtr_limit; /* idt */
+    uint32_t  idtr_base;
+    uint32_t  gdtr_limit; /* gdt */
+    uint32_t  gdtr_base;
+    uint32_t  cs_sel;     /* cs selector */
+    uint32_t  cs_limit;
+    uint32_t  cs_base;
+    union vmcs_arbytes cs_arbytes;
+    uint32_t  ds_sel;     /* ds selector */
+    uint32_t  ds_limit;
+    uint32_t  ds_base;
+    union vmcs_arbytes ds_arbytes;
+    uint32_t  es_sel;     /* es selector */
+    uint32_t  es_limit;
+    uint32_t  es_base;
+    union vmcs_arbytes es_arbytes;
+    uint32_t  ss_sel;     /* ss selector */
+    uint32_t  ss_limit;
+    uint32_t  ss_base;
+    union vmcs_arbytes ss_arbytes;
+    uint32_t  fs_sel;     /* fs selector */
+    uint32_t  fs_limit;
+    uint32_t  fs_base;
+    union vmcs_arbytes fs_arbytes;
+    uint32_t  gs_sel;     /* gs selector */
+    uint32_t  gs_limit;
+    uint32_t  gs_base;
+    union vmcs_arbytes gs_arbytes;
+    uint32_t  tr_sel;     /* task selector */
+    uint32_t  tr_limit;
+    uint32_t  tr_base;
+    union vmcs_arbytes tr_arbytes;
+    uint32_t  ldtr_sel;   /* ldtr selector */
+    uint32_t  ldtr_limit;
+    uint32_t  ldtr_base;
+    union vmcs_arbytes ldtr_arbytes;
 } vmx_assist_context_t;
 
 #endif /* __ASSEMBLY__ */
 
 #endif /* _VMX_ASSIST_H_ */
 
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 067b9aacb6c2 -r b3a255e88810 xen/include/public/xen.h
--- a/xen/include/public/xen.h  Wed Oct 12 09:11:35 2005
+++ b/xen/include/public/xen.h  Wed Oct 12 10:07:37 2005
@@ -213,7 +213,7 @@
 
 #ifndef __ASSEMBLY__
 
-typedef u16 domid_t;
+typedef uint16_t domid_t;
 
 /* Domain ids >= DOMID_FIRST_RESERVED cannot be used for ordinary domains. */
 #define DOMID_FIRST_RESERVED (0x7FF0U)
@@ -246,8 +246,8 @@
  */
 typedef struct
 {
-    u64 ptr;       /* Machine address of PTE. */
-    u64 val;       /* New contents of PTE.    */
+    uint64_t ptr;       /* Machine address of PTE. */
+    uint64_t val;       /* New contents of PTE.    */
 } mmu_update_t;
 
 /*
@@ -293,9 +293,9 @@
      * an upcall activation. The mask is cleared when the VCPU requests
      * to block: this avoids wakeup-waiting races.
      */
-    u8 evtchn_upcall_pending;
-    u8 evtchn_upcall_mask;
-    u32 evtchn_pending_sel;
+    uint8_t evtchn_upcall_pending;
+    uint8_t evtchn_upcall_mask;
+    uint32_t evtchn_pending_sel;
 #ifdef __ARCH_HAS_VCPU_INFO
     arch_vcpu_info_t arch;
 #endif
@@ -311,17 +311,17 @@
      * The correct way to interact with the version number is similar to
      * Linux's seqlock: see the implementations of read_seqbegin/read_seqretry.
      */
-    u32 version;
-    u64 tsc_timestamp;   /* TSC at last update of time vals.  */
-    u64 system_time;     /* Time, in nanosecs, since boot.    */
+    uint32_t version;
+    uint64_t tsc_timestamp;   /* TSC at last update of time vals.  */
+    uint64_t system_time;     /* Time, in nanosecs, since boot.    */
     /*
      * Current system time:
      *   system_time + ((tsc - tsc_timestamp) << tsc_shift) * tsc_to_system_mul
      * CPU frequency (Hz):
      *   ((10^9 << 32) / tsc_to_system_mul) >> tsc_shift
      */
-    u32 tsc_to_system_mul;
-    s8  tsc_shift;
+    uint32_t tsc_to_system_mul;
+    int8_t  tsc_shift;
 } vcpu_time_info_t;
 
 /*
@@ -333,7 +333,7 @@
 
     vcpu_time_info_t vcpu_time[MAX_VIRT_CPUS];
 
-    u32 n_vcpu;
+    uint32_t n_vcpu;
 
     /*
      * A domain can have up to 1024 "event channels" on which it can send
@@ -366,16 +366,16 @@
      * 32-bit selector to be set. Each bit in the selector covers a 32-bit
      * word in the PENDING bitfield array.
      */
-    u32 evtchn_pending[32];
-    u32 evtchn_mask[32];
+    uint32_t evtchn_pending[32];
+    uint32_t evtchn_mask[32];
 
     /*
      * Wallclock time: updated only by control software. Guests should base
      * their gettimeofday() syscall on this wallclock-base value.
      */
-    u32 wc_version;      /* Version counter: see vcpu_time_info_t. */
-    u32 wc_sec;          /* Secs  00:00:00 UTC, Jan 1, 1970.  */
-    u32 wc_nsec;         /* Nsecs 00:00:00 UTC, Jan 1, 1970.  */
+    uint32_t wc_version;      /* Version counter: see vcpu_time_info_t. */
+    uint32_t wc_sec;          /* Secs  00:00:00 UTC, Jan 1, 1970.  */
+    uint32_t wc_nsec;         /* Nsecs 00:00:00 UTC, Jan 1, 1970.  */
 
     arch_shared_info_t arch;
 
@@ -411,18 +411,18 @@
     /* THE FOLLOWING ARE FILLED IN BOTH ON INITIAL BOOT AND ON RESUME.    */
     unsigned long nr_pages;     /* Total pages allocated to this domain.  */
     unsigned long shared_info;  /* MACHINE address of shared info struct. */
-    u32      flags;             /* SIF_xxx flags.                         */
+    uint32_t flags;             /* SIF_xxx flags.                         */
     unsigned long store_mfn;    /* MACHINE page number of shared page.    */
-    u16      store_evtchn;      /* Event channel for store communication. */
+    uint16_t store_evtchn;      /* Event channel for store communication. */
     unsigned long console_mfn;  /* MACHINE address of console page.       */
-    u16      console_evtchn;    /* Event channel for console messages.    */
+    uint16_t console_evtchn;    /* Event channel for console messages.    */
     /* THE FOLLOWING ARE ONLY FILLED IN ON INITIAL BOOT (NOT RESUME).     */
     unsigned long pt_base;      /* VIRTUAL address of page directory.     */
     unsigned long nr_pt_frames; /* Number of bootstrap p.t. frames.       */
     unsigned long mfn_list;     /* VIRTUAL address of page-frame list.    */
     unsigned long mod_start;    /* VIRTUAL address of pre-loaded module.  */
     unsigned long mod_len;      /* Size (bytes) of pre-loaded module.     */
-    s8 cmd_line[MAX_GUEST_CMDLINE];
+    int8_t cmd_line[MAX_GUEST_CMDLINE];
 } start_info_t;
 
 /* These flags are passed in the 'flags' field of start_info_t. */
@@ -435,8 +435,18 @@
 /* For use in guest OSes. */
 extern shared_info_t *HYPERVISOR_shared_info;
 
-typedef u64 cpumap_t;
+typedef uint64_t cpumap_t;
 
 #endif /* !__ASSEMBLY__ */
 
 #endif /* __XEN_PUBLIC_XEN_H__ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 067b9aacb6c2 -r b3a255e88810 xen/include/xen/types.h
--- a/xen/include/xen/types.h   Wed Oct 12 09:11:35 2005
+++ b/xen/include/xen/types.h   Wed Oct 12 10:07:37 2005
@@ -32,23 +32,21 @@
 typedef unsigned int            uint;
 typedef unsigned long           ulong;
 
-#ifndef __BIT_TYPES_DEFINED__
-#define __BIT_TYPES_DEFINED__
-
+typedef         __u8            uint8_t;
 typedef         __u8            u_int8_t;
 typedef         __s8            int8_t;
+
+typedef         __u16           uint16_t;
 typedef         __u16           u_int16_t;
 typedef         __s16           int16_t;
+
+typedef         __u32           uint32_t;
 typedef         __u32           u_int32_t;
 typedef         __s32           int32_t;
 
-#endif /* !(__BIT_TYPES_DEFINED__) */
-
-typedef         __u8            uint8_t;
-typedef         __u16           uint16_t;
-typedef         __u32           uint32_t;
 typedef         __u64           uint64_t;
-
+typedef         __u64           u_int64_t;
+typedef         __s64           int64_t;
 
 struct domain;
 struct vcpu;
diff -r 067b9aacb6c2 -r b3a255e88810 tools/security/secpol_compat.h
--- a/tools/security/secpol_compat.h    Wed Oct 12 09:11:35 2005
+++ /dev/null   Wed Oct 12 10:07:37 2005
@@ -1,14 +0,0 @@
-/* secpol_compat.h
- *     'translates' data types necessary to
- *     include <xen/acm.h>
- */
-#include <stdint.h>
-
-typedef uint8_t  u8;
-typedef uint16_t u16;
-typedef uint32_t u32;
-typedef uint64_t u64;
-typedef int8_t   s8;
-typedef int16_t  s16;
-typedef int32_t  s32;
-typedef int64_t  s64;
diff -r 067b9aacb6c2 -r b3a255e88810 xen/include/public/io/usbif.h
--- a/xen/include/public/io/usbif.h     Wed Oct 12 09:11:35 2005
+++ /dev/null   Wed Oct 12 10:07:37 2005
@@ -1,66 +0,0 @@
-/******************************************************************************
- * usbif.h
- * 
- * Unified block-device I/O interface for Xen guest OSes.
- * 
- * Copyright (c) 2003-2004, Keir Fraser
- */
-
-#ifndef __SHARED_USBIF_H__
-#define __SHARED_USBIF_H__
-
-#define usbif_vdev_t   u16
-#define usbif_sector_t u64
-
-#define USBIF_OP_IO      0 /* Request IO to a device */
-#define USBIF_OP_PROBE   1 /* Is there a device on this port? */
-#define USBIF_OP_RESET   2 /* Reset a virtual USB port.       */
-
-typedef struct {
-    unsigned long  id;           /* private guest value, echoed in resp  */
-    u8             operation;    /* USBIF_OP_???                         */
-    u8  __pad1;
-    usbif_vdev_t   port;         /* guest virtual USB port               */
-    unsigned long  devnum :7;    /* Device address, as seen by the guest.*/
-    unsigned long  endpoint :4;  /* Device endpoint.                         */
-    unsigned long  direction :1; /* Pipe direction.                          */
-    unsigned long  speed :1;     /* Pipe speed.                              */
-    unsigned long  pipe_type :2; /* Pipe type (iso, bulk, int, ctrl)         */
-    unsigned long  __pad2 :18;
-    unsigned long  transfer_buffer; /* Machine address */
-    unsigned long  length;          /* Buffer length */
-    unsigned long  transfer_flags;  /* For now just pass Linux transfer
-                                     * flags - this may change. */
-    unsigned char setup[8];         /* Embed setup packets directly. */
-    unsigned long  iso_schedule;    /* Machine address of transfer sched (iso
-                                     * only) */
-    unsigned long num_iso;        /* length of iso schedule */
-    unsigned long timeout;        /* timeout in ms */
-} usbif_request_t;
-
-/* Data we need to pass:
- * - Transparently handle short packets or complain at us?
- */
-
-typedef struct {
-    unsigned long   id;              /* copied from request         */
-    u8              operation;       /* copied from request         */
-    u8              data;            /* Small chunk of in-band data */
-    s16             status;          /* USBIF_RSP_???               */
-    unsigned long   transfer_mutex;  /* Used for cancelling requests 
atomically. */
-    unsigned long    length;         /* How much data we really got */
-} usbif_response_t;
-
-#define USBIF_RSP_ERROR  -1 /* non-specific 'error' */
-#define USBIF_RSP_OKAY    0 /* non-specific 'okay'  */
-
-DEFINE_RING_TYPES(usbif, usbif_request_t, usbif_response_t);
-
-typedef struct {
-    unsigned long length; /* IN = expected, OUT = actual */
-    unsigned long buffer_offset;  /* IN offset in buffer specified in main
-                                     packet */
-    unsigned long status; /* OUT Status for this packet. */
-} usbif_iso_t;
-
-#endif /* __SHARED_USBIF_H__ */

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


 


Rackspace

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