ia64/xen-unstable

changeset 6296:0608852073c8

Get rid of memory_t. Almost all uses should be unsigned long.
The few uses for a physical/machine address have been mostly
changed to u64.

Grant table code probably needs auditing for PAE correctness,
but at least the interface is now sound.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri Aug 19 17:25:04 2005 +0000 (2005-08-19)
parents 74044b8186a9
children d0f23c103453 631cc5dc3e8a 81576d3d1ca8
files linux-2.6-xen-sparse/arch/xen/i386/kernel/ioport.c linux-2.6-xen-sparse/arch/xen/i386/kernel/process.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/process.c linux-2.6-xen-sparse/drivers/xen/blkback/common.h linux-2.6-xen-sparse/drivers/xen/blktap/blktap.h linux-2.6-xen-sparse/drivers/xen/netback/common.h linux-2.6-xen-sparse/drivers/xen/netback/netback.c tools/debugger/libxendebug/xendebug.c tools/debugger/libxendebug/xendebug.h tools/debugger/pdb/linux-2.6-module/debug.c tools/debugger/pdb/linux-2.6-module/module.c tools/debugger/pdb/linux-2.6-module/pdb_debug.h tools/debugger/pdb/pdb_caml_domain.c tools/debugger/pdb/pdb_caml_process.c tools/debugger/pdb/pdb_caml_xcs.c tools/libxc/xc.h tools/libxc/xc_gnttab.c tools/python/xen/lowlevel/xu/xu.c tools/xentrace/xentrace.c xen/arch/x86/physdev.c xen/common/trace.c xen/include/public/arch-ia64.h xen/include/public/arch-x86_32.h xen/include/public/arch-x86_64.h xen/include/public/dom0_ops.h xen/include/public/grant_table.h xen/include/public/io/domain_controller.h xen/include/public/io/netif.h xen/include/public/physdev.h xen/include/public/xen.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/ioport.c	Fri Aug 19 16:46:51 2005 +0000
     1.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/ioport.c	Fri Aug 19 17:25:04 2005 +0000
     1.3 @@ -80,7 +80,7 @@ asmlinkage long sys_ioperm(unsigned long
     1.4  		t->io_bitmap_ptr = bitmap;
     1.5  
     1.6  		op.cmd = PHYSDEVOP_SET_IOBITMAP;
     1.7 -		op.u.set_iobitmap.bitmap   = (unsigned long)bitmap;
     1.8 +		op.u.set_iobitmap.bitmap   = (char *)bitmap;
     1.9  		op.u.set_iobitmap.nr_ports = IO_BITMAP_BITS;
    1.10  		HYPERVISOR_physdev_op(&op);
    1.11  	}
     2.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/process.c	Fri Aug 19 16:46:51 2005 +0000
     2.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/process.c	Fri Aug 19 17:25:04 2005 +0000
     2.3 @@ -547,7 +547,7 @@ struct task_struct fastcall * __switch_t
     2.4  		iobmp_op.cmd                     =
     2.5  			PHYSDEVOP_SET_IOBITMAP;
     2.6  		iobmp_op.u.set_iobitmap.bitmap   =
     2.7 -			(unsigned long)next->io_bitmap_ptr;
     2.8 +			(char *)next->io_bitmap_ptr;
     2.9  		iobmp_op.u.set_iobitmap.nr_ports =
    2.10  			next->io_bitmap_ptr ? IO_BITMAP_BITS : 0;
    2.11  		mcl->op      = __HYPERVISOR_physdev_op;
     3.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/process.c	Fri Aug 19 16:46:51 2005 +0000
     3.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/process.c	Fri Aug 19 17:25:04 2005 +0000
     3.3 @@ -474,7 +474,7 @@ struct task_struct *__switch_to(struct t
     3.4  		iobmp_op.cmd                     =
     3.5  			PHYSDEVOP_SET_IOBITMAP;
     3.6  		iobmp_op.u.set_iobitmap.bitmap   =
     3.7 -			(unsigned long)next->io_bitmap_ptr;
     3.8 +			(char *)next->io_bitmap_ptr;
     3.9  		iobmp_op.u.set_iobitmap.nr_ports =
    3.10  			next->io_bitmap_ptr ? IO_BITMAP_BITS : 0;
    3.11  		mcl->op      = __HYPERVISOR_physdev_op;
     4.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkback/common.h	Fri Aug 19 16:46:51 2005 +0000
     4.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkback/common.h	Fri Aug 19 17:25:04 2005 +0000
     4.3 @@ -71,7 +71,7 @@ typedef struct blkif_st {
     4.4      struct work_struct work;
     4.5  #ifdef CONFIG_XEN_BLKDEV_GRANT
     4.6      u16 shmem_handle;
     4.7 -    memory_t shmem_vaddr;
     4.8 +    unsigned long shmem_vaddr;
     4.9      grant_ref_t shmem_ref;
    4.10  #endif
    4.11  } blkif_t;
     5.1 --- a/linux-2.6-xen-sparse/drivers/xen/blktap/blktap.h	Fri Aug 19 16:46:51 2005 +0000
     5.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blktap/blktap.h	Fri Aug 19 17:25:04 2005 +0000
     5.3 @@ -87,7 +87,7 @@ typedef struct blkif_st {
     5.4      struct work_struct work;
     5.5  #ifdef CONFIG_XEN_BLKDEV_GRANT
     5.6      u16 shmem_handle;
     5.7 -    memory_t shmem_vaddr;
     5.8 +    unsigned long shmem_vaddr;
     5.9      grant_ref_t shmem_ref;
    5.10  #endif
    5.11  } blkif_t;
     6.1 --- a/linux-2.6-xen-sparse/drivers/xen/netback/common.h	Fri Aug 19 16:46:51 2005 +0000
     6.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/common.h	Fri Aug 19 17:25:04 2005 +0000
     6.3 @@ -49,13 +49,13 @@ typedef struct netif_st {
     6.4      unsigned long    tx_shmem_frame;
     6.5  #ifdef CONFIG_XEN_NETDEV_GRANT_TX
     6.6      u16              tx_shmem_handle;
     6.7 -    memory_t         tx_shmem_vaddr; 
     6.8 +    unsigned long    tx_shmem_vaddr; 
     6.9      grant_ref_t      tx_shmem_ref; 
    6.10  #endif
    6.11      unsigned long    rx_shmem_frame;
    6.12  #ifdef CONFIG_XEN_NETDEV_GRANT_RX
    6.13      u16              rx_shmem_handle;
    6.14 -    memory_t         rx_shmem_vaddr; 
    6.15 +    unsigned long    rx_shmem_vaddr; 
    6.16      grant_ref_t      rx_shmem_ref; 
    6.17  #endif
    6.18      unsigned int     evtchn;
     7.1 --- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c	Fri Aug 19 16:46:51 2005 +0000
     7.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c	Fri Aug 19 17:25:04 2005 +0000
     7.3 @@ -43,7 +43,7 @@ static void make_tx_response(netif_t *ne
     7.4  static int  make_rx_response(netif_t *netif, 
     7.5                               u16      id, 
     7.6                               s8       st,
     7.7 -                             memory_t addr,
     7.8 +                             unsigned long addr,
     7.9                               u16      size,
    7.10                               u16      csum_valid);
    7.11  
    7.12 @@ -887,7 +887,7 @@ static void make_tx_response(netif_t *ne
    7.13  static int make_rx_response(netif_t *netif, 
    7.14                              u16      id, 
    7.15                              s8       st,
    7.16 -                            memory_t addr,
    7.17 +                            unsigned long addr,
    7.18                              u16      size,
    7.19                              u16      csum_valid)
    7.20  {
     8.1 --- a/tools/debugger/libxendebug/xendebug.c	Fri Aug 19 16:46:51 2005 +0000
     8.2 +++ b/tools/debugger/libxendebug/xendebug.c	Fri Aug 19 17:25:04 2005 +0000
     8.3 @@ -40,7 +40,7 @@ typedef int boolean;
     8.4  typedef struct bwcpoint                           /* break/watch/catch point */
     8.5  {
     8.6      struct list_head list;
     8.7 -    memory_t address;
     8.8 +    unsigned long address;
     8.9      u32 domain;
    8.10      u8 old_value;                             /* old value for software bkpt */
    8.11  } bwcpoint_t, *bwcpoint_p;
    8.12 @@ -311,7 +311,7 @@ xendebug_continue(int xc_handle,
    8.13  /* access to one page */
    8.14  static int
    8.15  xendebug_memory_page (domain_context_p ctxt, int xc_handle, u32 vcpu,
    8.16 -                      int protection, memory_t address, int length, u8 *buffer)
    8.17 +                      int protection, unsigned long address, int length, u8 *buffer)
    8.18  {
    8.19      vcpu_guest_context_t *vcpu_ctxt = &ctxt->context[vcpu];
    8.20      unsigned long pde, page;
    8.21 @@ -407,7 +407,7 @@ xendebug_memory_page (domain_context_p c
    8.22  /* divide a memory operation into accesses to individual pages */
    8.23  static int
    8.24  xendebug_memory_op (domain_context_p ctxt, int xc_handle, u32 vcpu,
    8.25 -                    int protection, memory_t address, int length, u8 *buffer)
    8.26 +                    int protection, unsigned long address, int length, u8 *buffer)
    8.27  {
    8.28      int      remain;              /* number of bytes to touch past this page */
    8.29      int      bytes   = 0;
    8.30 @@ -431,7 +431,7 @@ int
    8.31  xendebug_read_memory(int xc_handle,
    8.32                       u32 domid,
    8.33                       u32 vcpu,
    8.34 -                     memory_t address,
    8.35 +                     unsigned long address,
    8.36                       u32 length,
    8.37                       u8 *data)
    8.38  {
    8.39 @@ -451,7 +451,7 @@ int
    8.40  xendebug_write_memory(int xc_handle,
    8.41                        u32 domid,
    8.42                        u32 vcpu,
    8.43 -                      memory_t address,
    8.44 +                      unsigned long address,
    8.45                        u32 length,
    8.46                        u8 *data)
    8.47  {
    8.48 @@ -471,7 +471,7 @@ int
    8.49  xendebug_insert_memory_breakpoint(int xc_handle,
    8.50                                    u32 domid,
    8.51                                    u32 vcpu,
    8.52 -                                  memory_t address,
    8.53 +                                  unsigned long address,
    8.54                                    u32 length)
    8.55  {
    8.56      bwcpoint_p bkpt;
    8.57 @@ -517,7 +517,7 @@ int
    8.58  xendebug_remove_memory_breakpoint(int xc_handle,
    8.59                                    u32 domid,
    8.60                                    u32 vcpu,
    8.61 -                                  memory_t address,
    8.62 +                                  unsigned long address,
    8.63                                    u32 length)
    8.64  {
    8.65      bwcpoint_p bkpt = NULL;
     9.1 --- a/tools/debugger/libxendebug/xendebug.h	Fri Aug 19 16:46:51 2005 +0000
     9.2 +++ b/tools/debugger/libxendebug/xendebug.h	Fri Aug 19 17:25:04 2005 +0000
     9.3 @@ -45,7 +45,7 @@ int xendebug_continue(int xc_handle,
     9.4  int xendebug_read_memory(int xc_handle,
     9.5  			 u32 domid,
     9.6  			 u32 vcpu,
     9.7 -			 memory_t address,
     9.8 +			 unsigned long address,
     9.9  			 u32 length,
    9.10  			 u8 *data);
    9.11  
    9.12 @@ -53,7 +53,7 @@ int xendebug_read_memory(int xc_handle,
    9.13  int xendebug_write_memory(int xc_handle,
    9.14  			  u32 domid,
    9.15  			  u32 vcpu,
    9.16 -			  memory_t address,
    9.17 +			  unsigned long address,
    9.18  			  u32 length,
    9.19  			  u8 *data);
    9.20  
    9.21 @@ -61,13 +61,13 @@ int xendebug_write_memory(int xc_handle,
    9.22  int xendebug_insert_memory_breakpoint(int xc_handle,
    9.23  				      u32 domid,
    9.24  				      u32 vcpu,
    9.25 -				      memory_t address,
    9.26 +				      unsigned long address,
    9.27  				      u32 length);
    9.28  
    9.29  int xendebug_remove_memory_breakpoint(int xc_handle,
    9.30  				      u32 domid,
    9.31  				      u32 vcpu,
    9.32 -				      memory_t address,
    9.33 +				      unsigned long address,
    9.34  				      u32 length);
    9.35  
    9.36  int xendebug_query_domain_stop(int xc_handle,
    10.1 --- a/tools/debugger/pdb/linux-2.6-module/debug.c	Fri Aug 19 16:46:51 2005 +0000
    10.2 +++ b/tools/debugger/pdb/linux-2.6-module/debug.c	Fri Aug 19 17:25:04 2005 +0000
    10.3 @@ -26,7 +26,7 @@ static int pdb_page_fault_fn (struct pt_
    10.4  typedef struct bwcpoint                           /* break/watch/catch point */
    10.5  {
    10.6      struct list_head list;
    10.7 -    memory_t address;
    10.8 +    unsigned long address;
    10.9      int length;
   10.10  
   10.11      u8  type;                                                     /* BWC_??? */
   10.12 @@ -109,7 +109,7 @@ pdb_bwc_print_list (void)
   10.13  }
   10.14  
   10.15  bwcpoint_p
   10.16 -pdb_search_watchpoint (u32 process, memory_t address)
   10.17 +pdb_search_watchpoint (u32 process, unsigned long address)
   10.18  {
   10.19      bwcpoint_p bwc_watch = (bwcpoint_p) 0;
   10.20      bwcpoint_p bwc_entry = (bwcpoint_p) 0;
   10.21 @@ -364,7 +364,7 @@ pdb_step (struct task_struct *target)
   10.22  
   10.23  int
   10.24  pdb_insert_memory_breakpoint (struct task_struct *target, 
   10.25 -                              memory_t address, u32 length)
   10.26 +                              unsigned long address, u32 length)
   10.27  {
   10.28      int rc = 0;
   10.29      bwcpoint_p bkpt;
   10.30 @@ -399,7 +399,7 @@ pdb_insert_memory_breakpoint (struct tas
   10.31  
   10.32  int
   10.33  pdb_remove_memory_breakpoint (struct task_struct *target,
   10.34 -                              memory_t address, u32 length)
   10.35 +                              unsigned long address, u32 length)
   10.36  {
   10.37      int rc = 0;
   10.38      bwcpoint_p bkpt = NULL;
   10.39 @@ -760,7 +760,7 @@ pdb_int3_fn (struct pt_regs *regs, long 
   10.40  {
   10.41      pdb_response_t resp;
   10.42      bwcpoint_p bkpt = NULL;
   10.43 -    memory_t address = regs->eip - 1;
   10.44 +    unsigned long address = regs->eip - 1;
   10.45  
   10.46      struct list_head *entry;
   10.47      list_for_each(entry, &bwcpoint_list)
    11.1 --- a/tools/debugger/pdb/linux-2.6-module/module.c	Fri Aug 19 16:46:51 2005 +0000
    11.2 +++ b/tools/debugger/pdb/linux-2.6-module/module.c	Fri Aug 19 17:25:04 2005 +0000
    11.3 @@ -199,7 +199,7 @@ pdb_interrupt (int irq, void *dev_id, st
    11.4  }
    11.5  
    11.6  static void
    11.7 -pdb_send_connection_status(int status, memory_t ring)
    11.8 +pdb_send_connection_status(int status, unsigned long ring)
    11.9  {
   11.10      ctrl_msg_t cmsg = 
   11.11      {
    12.1 --- a/tools/debugger/pdb/linux-2.6-module/pdb_debug.h	Fri Aug 19 16:46:51 2005 +0000
    12.2 +++ b/tools/debugger/pdb/linux-2.6-module/pdb_debug.h	Fri Aug 19 17:25:04 2005 +0000
    12.3 @@ -18,9 +18,9 @@ int pdb_continue (struct task_struct *ta
    12.4  int pdb_step (struct task_struct *target);
    12.5  
    12.6  int pdb_insert_memory_breakpoint (struct task_struct *target, 
    12.7 -                                  memory_t address, u32 length);
    12.8 +                                  unsigned long address, u32 length);
    12.9  int pdb_remove_memory_breakpoint (struct task_struct *target,
   12.10 -                                  memory_t address, u32 length);
   12.11 +                                  unsigned long address, u32 length);
   12.12  int pdb_insert_watchpoint (struct task_struct *target,
   12.13                             pdb_op_watchpt_p watchpt);
   12.14  int pdb_remove_watchpoint (struct task_struct *target,
    13.1 --- a/tools/debugger/pdb/pdb_caml_domain.c	Fri Aug 19 16:46:51 2005 +0000
    13.2 +++ b/tools/debugger/pdb/pdb_caml_domain.c	Fri Aug 19 17:25:04 2005 +0000
    13.3 @@ -203,7 +203,7 @@ dom_read_memory (value context, value ad
    13.4      context_t ctx;
    13.5      int loop;
    13.6      char *buffer;
    13.7 -    memory_t my_address = Int32_val(address);
    13.8 +    unsigned long my_address = Int32_val(address);
    13.9      u32 my_length = Int_val(length);
   13.10  
   13.11      printf ("(pdb) read memory\n");
   13.12 @@ -259,7 +259,7 @@ dom_write_memory (value context, value a
   13.13      context_t ctx;
   13.14  
   13.15      char buffer[4096];  /* a big buffer */
   13.16 -    memory_t  my_address;
   13.17 +    unsigned long  my_address;
   13.18      u32 length = 0;
   13.19  
   13.20      printf ("(pdb) write memory\n");
   13.21 @@ -279,7 +279,7 @@ dom_write_memory (value context, value a
   13.22      }
   13.23      buffer[length++] = Int_val(Field(node, 0));
   13.24  
   13.25 -    my_address = (memory_t) Int32_val(address);
   13.26 +    my_address = (unsigned long) Int32_val(address);
   13.27  
   13.28      if ( xendebug_write_memory(xc_handle, ctx.domain, ctx.vcpu,
   13.29                                 my_address, length, buffer) )
   13.30 @@ -344,7 +344,7 @@ dom_insert_memory_breakpoint (value cont
   13.31      CAMLparam3(context, address, length);
   13.32  
   13.33      context_t ctx;
   13.34 -    memory_t my_address = (memory_t) Int32_val(address);
   13.35 +    unsigned long my_address = (unsigned long) Int32_val(address);
   13.36      int my_length = Int_val(length);
   13.37  
   13.38      decode_context(&ctx, context);
   13.39 @@ -373,7 +373,7 @@ dom_remove_memory_breakpoint (value cont
   13.40  
   13.41      context_t ctx;
   13.42  
   13.43 -    memory_t my_address = (memory_t) Int32_val(address);
   13.44 +    unsigned long my_address = (unsigned long) Int32_val(address);
   13.45      int my_length = Int_val(length);
   13.46  
   13.47      printf ("(pdb) remove memory breakpoint 0x%lx %d\n",
    14.1 --- a/tools/debugger/pdb/pdb_caml_process.c	Fri Aug 19 16:46:51 2005 +0000
    14.2 +++ b/tools/debugger/pdb/pdb_caml_process.c	Fri Aug 19 17:25:04 2005 +0000
    14.3 @@ -495,7 +495,7 @@ proc_insert_memory_breakpoint (value con
    14.4  
    14.5      req.operation = PDB_OPCODE_SET_BKPT;
    14.6      req.process = ctx.process;
    14.7 -    req.u.bkpt.address = (memory_t) Int32_val(address);
    14.8 +    req.u.bkpt.address = (unsigned long) Int32_val(address);
    14.9      req.u.bkpt.length  =  Int_val(length);
   14.10  
   14.11      send_request(ctx.ring, ctx.evtchn, &req);
   14.12 @@ -518,7 +518,7 @@ proc_remove_memory_breakpoint (value con
   14.13  
   14.14      req.operation = PDB_OPCODE_CLR_BKPT;
   14.15      req.process = ctx.process;
   14.16 -    req.u.bkpt.address = (memory_t) Int32_val(address);
   14.17 +    req.u.bkpt.address = (unsigned long) Int32_val(address);
   14.18      req.u.bkpt.length  =  Int_val(length);
   14.19  
   14.20      send_request(ctx.ring, ctx.evtchn, &req);
   14.21 @@ -542,7 +542,7 @@ proc_insert_watchpoint (value context, v
   14.22      req.operation = PDB_OPCODE_SET_WATCHPT;
   14.23      req.process = ctx.process;
   14.24      req.u.watchpt.type    =  Int_val(kind);
   14.25 -    req.u.watchpt.address = (memory_t) Int32_val(address);
   14.26 +    req.u.watchpt.address = (unsigned long) Int32_val(address);
   14.27      req.u.watchpt.length  =  Int_val(length);
   14.28  
   14.29      send_request(ctx.ring, ctx.evtchn, &req);
   14.30 @@ -566,7 +566,7 @@ proc_remove_watchpoint (value context, v
   14.31      req.operation = PDB_OPCODE_CLR_WATCHPT;
   14.32      req.process = ctx.process;
   14.33      req.u.watchpt.type    =  Int_val(kind);
   14.34 -    req.u.watchpt.address = (memory_t) Int32_val(address);
   14.35 +    req.u.watchpt.address = (unsigned long) Int32_val(address);
   14.36      req.u.watchpt.length  =  Int_val(length);
   14.37  
   14.38      send_request(ctx.ring, ctx.evtchn, &req);
    15.1 --- a/tools/debugger/pdb/pdb_caml_xcs.c	Fri Aug 19 16:46:51 2005 +0000
    15.2 +++ b/tools/debugger/pdb/pdb_caml_xcs.c	Fri Aug 19 17:25:04 2005 +0000
    15.3 @@ -50,7 +50,7 @@ xcs_initialize_ring (value domain, value
    15.4  {
    15.5      CAMLparam2(domain, ring);
    15.6      int my_domain = Int_val(domain);
    15.7 -    memory_t my_ring = Int32_val(ring);
    15.8 +    unsigned long my_ring = Int32_val(ring);
    15.9  
   15.10      pdb_front_ring_t *front_ring;
   15.11      pdb_sring_t *sring;
    16.1 --- a/tools/libxc/xc.h	Fri Aug 19 16:46:51 2005 +0000
    16.2 +++ b/tools/libxc/xc.h	Fri Aug 19 17:25:04 2005 +0000
    16.3 @@ -515,25 +515,25 @@ int xc_grant_interface_open(void);
    16.4   */
    16.5  int xc_grant_interface_close(int xc_handle);
    16.6  
    16.7 -int xc_gnttab_map_grant_ref(int         xc_handle,
    16.8 -                            memory_t    host_virt_addr,
    16.9 -                            u32         dom,
   16.10 -                            u16         ref,
   16.11 -                            u16         flags,
   16.12 -                            s16        *handle,
   16.13 -                            memory_t   *dev_bus_addr);
   16.14 +int xc_gnttab_map_grant_ref(int  xc_handle,
   16.15 +                            u64  host_virt_addr,
   16.16 +                            u32  dom,
   16.17 +                            u16  ref,
   16.18 +                            u16  flags,
   16.19 +                            s16 *handle,
   16.20 +                            u64 *dev_bus_addr);
   16.21  
   16.22 -int xc_gnttab_unmap_grant_ref(int       xc_handle,
   16.23 -                              memory_t  host_virt_addr,
   16.24 -                              memory_t  dev_bus_addr,
   16.25 -                              u16       handle,
   16.26 -                              s16      *status);
   16.27 +int xc_gnttab_unmap_grant_ref(int  xc_handle,
   16.28 +                              u64  host_virt_addr,
   16.29 +                              u64  dev_bus_addr,
   16.30 +                              u16  handle,
   16.31 +                              s16 *status);
   16.32  
   16.33  int xc_gnttab_setup_table(int        xc_handle,
   16.34                            u32        dom,
   16.35                            u16        nr_frames,
   16.36                            s16       *status,
   16.37 -                          memory_t **frame_list);
   16.38 +                          unsigned long **frame_list);
   16.39  
   16.40  /* Grant debug builds only: */
   16.41  int xc_gnttab_dump_table(int        xc_handle,
    17.1 --- a/tools/libxc/xc_gnttab.c	Fri Aug 19 16:46:51 2005 +0000
    17.2 +++ b/tools/libxc/xc_gnttab.c	Fri Aug 19 17:25:04 2005 +0000
    17.3 @@ -40,12 +40,12 @@ do_gnttab_op(int xc_handle,
    17.4  
    17.5  
    17.6  int xc_gnttab_map_grant_ref(int         xc_handle,
    17.7 -                            memory_t    host_virt_addr,
    17.8 +                            u64    host_virt_addr,
    17.9                              u32         dom,
   17.10                              u16         ref,
   17.11                              u16         flags,
   17.12                              s16        *handle,
   17.13 -                            memory_t   *dev_bus_addr)
   17.14 +                            u64   *dev_bus_addr)
   17.15  {
   17.16      struct gnttab_map_grant_ref op;
   17.17      int rc;
   17.18 @@ -67,8 +67,8 @@ int xc_gnttab_map_grant_ref(int         
   17.19  
   17.20  
   17.21  int xc_gnttab_unmap_grant_ref(int       xc_handle,
   17.22 -                              memory_t  host_virt_addr,
   17.23 -                              memory_t  dev_bus_addr,
   17.24 +                              u64  host_virt_addr,
   17.25 +                              u64  dev_bus_addr,
   17.26                                u16       handle,
   17.27                                s16      *status)
   17.28  {
   17.29 @@ -92,7 +92,7 @@ int xc_gnttab_setup_table(int        xc_
   17.30                            u32        dom,
   17.31                            u16        nr_frames,
   17.32                            s16       *status,
   17.33 -                          memory_t **frame_list)
   17.34 +                          unsigned long **frame_list)
   17.35  {
   17.36      struct gnttab_setup_table op;
   17.37      int rc, i;
    18.1 --- a/tools/python/xen/lowlevel/xu/xu.c	Fri Aug 19 16:46:51 2005 +0000
    18.2 +++ b/tools/python/xen/lowlevel/xu/xu.c	Fri Aug 19 17:25:04 2005 +0000
    18.3 @@ -844,7 +844,7 @@ static PyObject *xu_message_new(PyObject
    18.4      case TYPE(CMSG_BLKIF_BE, CMSG_BLKIF_BE_CONNECT):
    18.5          P2C(blkif_be_connect_t, domid,        u32);
    18.6          P2C(blkif_be_connect_t, blkif_handle, u32);
    18.7 -        P2C(blkif_be_connect_t, shmem_frame,  memory_t);
    18.8 +        P2C(blkif_be_connect_t, shmem_frame,  unsigned long);
    18.9          P2C(blkif_be_connect_t, shmem_ref,    u32);
   18.10          P2C(blkif_be_connect_t, evtchn,       u16);
   18.11          break;
   18.12 @@ -906,9 +906,9 @@ static PyObject *xu_message_new(PyObject
   18.13      case TYPE(CMSG_NETIF_BE, CMSG_NETIF_BE_CONNECT):
   18.14          P2C(netif_be_connect_t, domid,          u32);
   18.15          P2C(netif_be_connect_t, netif_handle,   u32);
   18.16 -        P2C(netif_be_connect_t, tx_shmem_frame, memory_t);
   18.17 +        P2C(netif_be_connect_t, tx_shmem_frame, unsigned long);
   18.18          P2C(netif_be_connect_t, tx_shmem_ref,   u32); 
   18.19 -        P2C(netif_be_connect_t, rx_shmem_frame, memory_t);
   18.20 +        P2C(netif_be_connect_t, rx_shmem_frame, unsigned long);
   18.21          P2C(netif_be_connect_t, rx_shmem_ref,   u32); 
   18.22          P2C(netif_be_connect_t, evtchn,         u16); 
   18.23          break;
   18.24 @@ -942,7 +942,7 @@ static PyObject *xu_message_new(PyObject
   18.25          P2C(usbif_fe_driver_status_changed_t, status, u32);
   18.26          break;
   18.27      case TYPE(CMSG_USBIF_FE, CMSG_USBIF_FE_INTERFACE_CONNECT):
   18.28 -        P2C(usbif_fe_interface_connect_t, shmem_frame, memory_t);
   18.29 +        P2C(usbif_fe_interface_connect_t, shmem_frame, unsigned long);
   18.30          break;
   18.31      case TYPE(CMSG_USBIF_FE, CMSG_USBIF_FE_INTERFACE_DISCONNECT):
   18.32          break;
   18.33 @@ -956,7 +956,7 @@ static PyObject *xu_message_new(PyObject
   18.34          break;
   18.35      case TYPE(CMSG_USBIF_BE, CMSG_USBIF_BE_CONNECT):
   18.36          P2C(usbif_be_connect_t, domid, domid_t);
   18.37 -        P2C(usbif_be_connect_t, shmem_frame, memory_t);
   18.38 +        P2C(usbif_be_connect_t, shmem_frame, unsigned long);
   18.39          P2C(usbif_be_connect_t, evtchn, u32);
   18.40          P2C(usbif_be_connect_t, bandwidth, u32);
   18.41          P2C(usbif_be_connect_t, status, u32);
    19.1 --- a/tools/xentrace/xentrace.c	Fri Aug 19 16:46:51 2005 +0000
    19.2 +++ b/tools/xentrace/xentrace.c	Fri Aug 19 17:25:04 2005 +0000
    19.3 @@ -95,13 +95,13 @@ void write_rec(unsigned int cpu, struct 
    19.4  
    19.5  /**
    19.6   * get_tbufs - get pointer to and size of the trace buffers
    19.7 - * @mach_addr: location to store machine address if the trace buffers to
    19.8 - * @size:      location to store the size of a trace buffer to
    19.9 + * @mfn:  location to store mfn of the trace buffers to
   19.10 + * @size: location to store the size of a trace buffer to
   19.11   *
   19.12   * Gets the machine address of the trace pointer area and the size of the
   19.13   * per CPU buffers.
   19.14   */
   19.15 -void get_tbufs(unsigned long *mach_addr, unsigned long *size)
   19.16 +void get_tbufs(unsigned long *mfn, unsigned long *size)
   19.17  {
   19.18      int ret;
   19.19      dom0_op_t op;                        /* dom0 op we'll build             */
   19.20 @@ -121,19 +121,19 @@ void get_tbufs(unsigned long *mach_addr,
   19.21          exit(EXIT_FAILURE);
   19.22      }
   19.23  
   19.24 -    *mach_addr = op.u.tbufcontrol.mach_addr;
   19.25 -    *size      = op.u.tbufcontrol.size;
   19.26 +    *mfn  = op.u.tbufcontrol.buffer_mfn;
   19.27 +    *size = op.u.tbufcontrol.size;
   19.28  }
   19.29  
   19.30  /**
   19.31   * map_tbufs - memory map Xen trace buffers into user space
   19.32 - * @tbufs:     machine address of the trace buffers
   19.33 + * @tbufs_mfn: mfn of the trace buffers
   19.34   * @num:       number of trace buffers to map
   19.35   * @size:      size of each trace buffer
   19.36   *
   19.37   * Maps the Xen trace buffers them into process address space.
   19.38   */
   19.39 -struct t_buf *map_tbufs(unsigned long tbufs_mach, unsigned int num,
   19.40 +struct t_buf *map_tbufs(unsigned long tbufs_mfn, unsigned int num,
   19.41                          unsigned long size)
   19.42  {
   19.43      int xc_handle;                  /* file descriptor for /proc/xen/privcmd */
   19.44 @@ -149,7 +149,7 @@ struct t_buf *map_tbufs(unsigned long tb
   19.45  
   19.46      tbufs_mapped = xc_map_foreign_range(xc_handle, 0 /* Dom 0 ID */,
   19.47                                          size * num, PROT_READ,
   19.48 -                                        tbufs_mach >> PAGE_SHIFT);
   19.49 +                                        tbufs_mfn);
   19.50  
   19.51      xc_interface_close(xc_handle);
   19.52  
   19.53 @@ -231,7 +231,7 @@ struct t_buf **init_bufs_ptrs(void *bufs
   19.54  
   19.55  /**
   19.56   * init_rec_ptrs - initialises data area pointers to locations in user space
   19.57 - * @tbufs_mach:    machine base address of the trace buffer area
   19.58 + * @tbufs_mfn:     base mfn of the trace buffer area
   19.59   * @tbufs_mapped:  user virtual address of base of trace buffer area
   19.60   * @meta:          array of user-space pointers to struct t_buf's of metadata
   19.61   * @num:           number of trace buffers
   19.62 @@ -240,7 +240,7 @@ struct t_buf **init_bufs_ptrs(void *bufs
   19.63   * mapped in user space.  Note that the trace buffer metadata contains machine
   19.64   * pointers - the array returned allows more convenient access to them.
   19.65   */
   19.66 -struct t_rec **init_rec_ptrs(unsigned long tbufs_mach,
   19.67 +struct t_rec **init_rec_ptrs(unsigned long tbufs_mfn,
   19.68                               struct t_buf *tbufs_mapped,
   19.69                               struct t_buf **meta,
   19.70                               unsigned int num)
   19.71 @@ -256,7 +256,7 @@ struct t_rec **init_rec_ptrs(unsigned lo
   19.72      }
   19.73  
   19.74      for ( i = 0; i < num; i++ )
   19.75 -        data[i] = (struct t_rec *)(meta[i]->rec_addr - tbufs_mach
   19.76 +        data[i] = (struct t_rec *)(meta[i]->rec_addr - (tbufs_mfn<<XC_PAGE_SHIFT) /* XXX */
   19.77                                     + (unsigned long)tbufs_mapped);
   19.78  
   19.79      return data;
   19.80 @@ -330,7 +330,7 @@ int monitor_tbufs(FILE *logfile)
   19.81      struct t_rec **data;         /* pointers to the trace buffer data areas
   19.82                                    * where they are mapped into user space.   */
   19.83      unsigned long *cons;         /* store tail indexes for the trace buffers */
   19.84 -    unsigned long tbufs_mach;    /* machine address of the tbufs             */
   19.85 +    unsigned long tbufs_mfn;     /* mfn of the tbufs                         */
   19.86      unsigned int  num;           /* number of trace buffers / logical CPUS   */
   19.87      unsigned long size;          /* size of a single trace buffer            */
   19.88  
   19.89 @@ -340,14 +340,14 @@ int monitor_tbufs(FILE *logfile)
   19.90      num = get_num_cpus();
   19.91  
   19.92      /* setup access to trace buffers */
   19.93 -    get_tbufs(&tbufs_mach, &size);
   19.94 -    tbufs_mapped = map_tbufs(tbufs_mach, num, size);
   19.95 +    get_tbufs(&tbufs_mfn, &size);
   19.96 +    tbufs_mapped = map_tbufs(tbufs_mfn, num, size);
   19.97  
   19.98      size_in_recs = (size - sizeof(struct t_buf)) / sizeof(struct t_rec);
   19.99  
  19.100      /* build arrays of convenience ptrs */
  19.101      meta  = init_bufs_ptrs (tbufs_mapped, num, size);
  19.102 -    data  = init_rec_ptrs  (tbufs_mach, tbufs_mapped, meta, num);
  19.103 +    data  = init_rec_ptrs  (tbufs_mfn, tbufs_mapped, meta, num);
  19.104      cons  = init_tail_idxs (meta, num);
  19.105  
  19.106      /* now, scan buffers for events */
    20.1 --- a/xen/arch/x86/physdev.c	Fri Aug 19 16:46:51 2005 +0000
    20.2 +++ b/xen/arch/x86/physdev.c	Fri Aug 19 17:25:04 2005 +0000
    20.3 @@ -106,7 +106,7 @@ long do_physdev_op(physdev_op_t *uop)
    20.4               (op.u.set_iobitmap.nr_ports > 65536) )
    20.5              break;
    20.6          ret = 0;
    20.7 -        current->arch.iobmp       = (u8 *)op.u.set_iobitmap.bitmap;
    20.8 +        current->arch.iobmp       = op.u.set_iobitmap.bitmap;
    20.9          current->arch.iobmp_limit = op.u.set_iobitmap.nr_ports;
   20.10          break;
   20.11      default:
    21.1 --- a/xen/common/trace.c	Fri Aug 19 16:46:51 2005 +0000
    21.2 +++ b/xen/common/trace.c	Fri Aug 19 17:25:04 2005 +0000
    21.3 @@ -113,10 +113,10 @@ int tb_control(dom0_tbufcontrol_t *tbc)
    21.4      switch ( tbc->op)
    21.5      {
    21.6      case DOM0_TBUF_GET_INFO:
    21.7 -        tbc->cpu_mask  = tb_cpu_mask;
    21.8 -        tbc->evt_mask  = tb_event_mask;
    21.9 -        tbc->mach_addr = __pa(t_bufs[0]);
   21.10 -        tbc->size      = opt_tbuf_size * PAGE_SIZE;
   21.11 +        tbc->cpu_mask   = tb_cpu_mask;
   21.12 +        tbc->evt_mask   = tb_event_mask;
   21.13 +        tbc->buffer_mfn = __pa(t_bufs[0]) >> PAGE_SHIFT;
   21.14 +        tbc->size       = opt_tbuf_size * PAGE_SIZE;
   21.15          break;
   21.16      case DOM0_TBUF_SET_CPU_MASK:
   21.17          tb_cpu_mask = tbc->cpu_mask;
    22.1 --- a/xen/include/public/arch-ia64.h	Fri Aug 19 16:46:51 2005 +0000
    22.2 +++ b/xen/include/public/arch-ia64.h	Fri Aug 19 17:25:04 2005 +0000
    22.3 @@ -13,9 +13,6 @@
    22.4  
    22.5  #ifndef __ASSEMBLY__
    22.6  
    22.7 -/* NB. Both the following are 64 bits each. */
    22.8 -typedef unsigned long memory_t;   /* Full-sized pointer/address/memory-size. */
    22.9 -
   22.10  #define MAX_NR_SECTION  32  // at most 32 memory holes
   22.11  typedef struct {
   22.12      unsigned long	start; 	/* start of memory hole */
    23.1 --- a/xen/include/public/arch-x86_32.h	Fri Aug 19 16:46:51 2005 +0000
    23.2 +++ b/xen/include/public/arch-x86_32.h	Fri Aug 19 17:25:04 2005 +0000
    23.3 @@ -63,9 +63,6 @@
    23.4  
    23.5  #ifndef __ASSEMBLY__
    23.6  
    23.7 -/* NB. Both the following are 32 bits each. */
    23.8 -typedef unsigned long memory_t;   /* Full-sized pointer/address/memory-size. */
    23.9 -
   23.10  /*
   23.11   * Send an array of these to HYPERVISOR_set_trap_table()
   23.12   */
   23.13 @@ -74,10 +71,10 @@ typedef unsigned long memory_t;   /* Ful
   23.14  #define TI_SET_DPL(_ti,_dpl) ((_ti)->flags |= (_dpl))
   23.15  #define TI_SET_IF(_ti,_if)   ((_ti)->flags |= ((!!(_if))<<2))
   23.16  typedef struct trap_info {
   23.17 -    u8       vector;  /* exception vector                              */
   23.18 -    u8       flags;   /* 0-3: privilege level; 4: clear event enable?  */
   23.19 -    u16      cs;      /* code selector                                 */
   23.20 -    memory_t address; /* code address                                  */
   23.21 +    u8       vector;       /* exception vector                              */
   23.22 +    u8       flags;        /* 0-3: privilege level; 4: clear event enable?  */
   23.23 +    u16      cs;           /* code selector                                 */
   23.24 +    unsigned long address; /* code offset                                   */
   23.25  } trap_info_t;
   23.26  
   23.27  typedef struct cpu_user_regs {
    24.1 --- a/xen/include/public/arch-x86_64.h	Fri Aug 19 16:46:51 2005 +0000
    24.2 +++ b/xen/include/public/arch-x86_64.h	Fri Aug 19 17:25:04 2005 +0000
    24.3 @@ -103,9 +103,6 @@ struct switch_to_user {
    24.4      /* Bottom of switch_to_user stack frame. */
    24.5  };
    24.6  
    24.7 -/* NB. Both the following are 64 bits each. */
    24.8 -typedef unsigned long memory_t;   /* Full-sized pointer/address/memory-size. */
    24.9 -
   24.10  /*
   24.11   * Send an array of these to HYPERVISOR_set_trap_table().
   24.12   * N.B. As in x86/32 mode, the privilege level specifies which modes may enter
   24.13 @@ -121,10 +118,10 @@ typedef unsigned long memory_t;   /* Ful
   24.14  #define TI_SET_DPL(_ti,_dpl) ((_ti)->flags |= (_dpl))
   24.15  #define TI_SET_IF(_ti,_if)   ((_ti)->flags |= ((!!(_if))<<2))
   24.16  typedef struct trap_info {
   24.17 -    u8       vector;  /* exception vector                              */
   24.18 -    u8       flags;   /* 0-3: privilege level; 4: clear event enable?  */
   24.19 -    u16      cs;      /* code selector                                 */
   24.20 -    memory_t address; /* code address                                  */
   24.21 +    u8       vector;       /* exception vector                              */
   24.22 +    u8       flags;        /* 0-3: privilege level; 4: clear event enable?  */
   24.23 +    u16      cs;           /* code selector                                 */
   24.24 +    unsigned long address; /* code offset                                   */
   24.25  } trap_info_t;
   24.26  
   24.27  typedef struct cpu_user_regs {
    25.1 --- a/xen/include/public/dom0_ops.h	Fri Aug 19 16:46:51 2005 +0000
    25.2 +++ b/xen/include/public/dom0_ops.h	Fri Aug 19 17:25:04 2005 +0000
    25.3 @@ -19,7 +19,7 @@
    25.4   * This makes sure that old versions of dom0 tools will stop working in a
    25.5   * well-defined way (rather than crashing the machine, for instance).
    25.6   */
    25.7 -#define DOM0_INTERFACE_VERSION   0xAAAA100E
    25.8 +#define DOM0_INTERFACE_VERSION   0xAAAA100F
    25.9  
   25.10  /************************************************************************/
   25.11  
   25.12 @@ -27,10 +27,10 @@
   25.13  typedef struct {
   25.14      /* IN variables. */
   25.15      domid_t       domain;
   25.16 -    memory_t      max_pfns;
   25.17 +    unsigned long max_pfns;
   25.18      void         *buffer;
   25.19      /* OUT variables. */
   25.20 -    memory_t      num_pfns;
   25.21 +    unsigned long num_pfns;
   25.22  } dom0_getmemlist_t;
   25.23  
   25.24  #define DOM0_SCHEDCTL          6
   25.25 @@ -83,9 +83,9 @@ typedef struct {
   25.26  #define DOMFLAGS_SHUTDOWNMASK 255 /* DOMFLAGS_SHUTDOWN guest-supplied code.  */
   25.27  #define DOMFLAGS_SHUTDOWNSHIFT 16
   25.28      u32      flags;
   25.29 -    memory_t tot_pages;
   25.30 -    memory_t max_pages;
   25.31 -    memory_t shared_info_frame;       /* MFN of shared_info struct */
   25.32 +    unsigned long tot_pages;
   25.33 +    unsigned long max_pages;
   25.34 +    unsigned long shared_info_frame;       /* MFN of shared_info struct */
   25.35      u64      cpu_time;
   25.36      u32      n_vcpu;
   25.37      s32      vcpu_to_cpu[MAX_VIRT_CPUS];  /* current mapping   */
   25.38 @@ -155,7 +155,7 @@ typedef struct {
   25.39  
   25.40  typedef struct {
   25.41      /* IN variables. */
   25.42 -    memory_t pfn;          /* Machine page frame number to query.       */
   25.43 +    unsigned long pfn;     /* Machine page frame number to query.       */
   25.44      domid_t domain;        /* To which domain does the frame belong?    */
   25.45      /* OUT variables. */
   25.46      /* Is the page PINNED to a type? */
   25.47 @@ -197,7 +197,7 @@ typedef struct {
   25.48      unsigned long cpu_mask;
   25.49      u32           evt_mask;
   25.50      /* OUT variables */
   25.51 -    memory_t mach_addr;
   25.52 +    unsigned long buffer_mfn;
   25.53      u32      size;
   25.54  } dom0_tbufcontrol_t;
   25.55  
   25.56 @@ -211,8 +211,8 @@ typedef struct {
   25.57      u32      sockets_per_node;
   25.58      u32      nr_nodes;
   25.59      u32      cpu_khz;
   25.60 -    memory_t total_pages;
   25.61 -    memory_t free_pages;
   25.62 +    unsigned long total_pages;
   25.63 +    unsigned long free_pages;
   25.64  } dom0_physinfo_t;
   25.65  
   25.66  /*
   25.67 @@ -252,7 +252,7 @@ typedef struct {
   25.68      u32            op;
   25.69      unsigned long *dirty_bitmap; /* pointer to locked buffer */
   25.70      /* IN/OUT variables. */
   25.71 -    memory_t       pages;        /* size of buffer, updated with actual size */
   25.72 +    unsigned long  pages;        /* size of buffer, updated with actual size */
   25.73      /* OUT variables. */
   25.74      dom0_shadow_control_stats_t stats;
   25.75  } dom0_shadow_control_t;
   25.76 @@ -260,15 +260,15 @@ typedef struct {
   25.77  #define DOM0_SETDOMAINMAXMEM   28
   25.78  typedef struct {
   25.79      /* IN variables. */
   25.80 -    domid_t     domain;
   25.81 -    memory_t    max_memkb;
   25.82 +    domid_t       domain;
   25.83 +    unsigned long max_memkb;
   25.84  } dom0_setdomainmaxmem_t;
   25.85  
   25.86  #define DOM0_GETPAGEFRAMEINFO2 29   /* batched interface */
   25.87  typedef struct {
   25.88      /* IN variables. */
   25.89 -    domid_t  domain;
   25.90 -    memory_t num;
   25.91 +    domid_t        domain;
   25.92 +    unsigned long  num;
   25.93      /* IN/OUT variables. */
   25.94      unsigned long *array;
   25.95  } dom0_getpageframeinfo2_t;
   25.96 @@ -283,12 +283,12 @@ typedef struct {
   25.97  #define DOM0_ADD_MEMTYPE         31
   25.98  typedef struct {
   25.99      /* IN variables. */
  25.100 -    memory_t pfn;
  25.101 -    memory_t nr_pfns;
  25.102 -    u32      type;
  25.103 +    unsigned long pfn;
  25.104 +    unsigned long nr_pfns;
  25.105 +    u32           type;
  25.106      /* OUT variables. */
  25.107 -    u32      handle;
  25.108 -    u32      reg;
  25.109 +    u32           handle;
  25.110 +    u32           reg;
  25.111  } dom0_add_memtype_t;
  25.112  
  25.113  /*
  25.114 @@ -311,8 +311,8 @@ typedef struct {
  25.115      /* IN variables. */
  25.116      u32      reg;
  25.117      /* OUT variables. */
  25.118 -    memory_t pfn;
  25.119 -    memory_t nr_pfns;
  25.120 +    unsigned long pfn;
  25.121 +    unsigned long nr_pfns;
  25.122      u32      type;
  25.123  } dom0_read_memtype_t;
  25.124  
  25.125 @@ -361,10 +361,10 @@ typedef struct {
  25.126  typedef struct {
  25.127      /* IN variables. */
  25.128      domid_t               first_domain;
  25.129 -    memory_t              max_domains;
  25.130 +    unsigned int          max_domains;
  25.131      dom0_getdomaininfo_t *buffer;
  25.132      /* OUT variables. */
  25.133 -    memory_t              num_domains;
  25.134 +    unsigned int          num_domains;
  25.135  } dom0_getdomaininfolist_t;
  25.136  
  25.137  #define DOM0_PLATFORM_QUIRK      39  
    26.1 --- a/xen/include/public/grant_table.h	Fri Aug 19 16:46:51 2005 +0000
    26.2 +++ b/xen/include/public/grant_table.h	Fri Aug 19 17:25:04 2005 +0000
    26.3 @@ -153,13 +153,13 @@ typedef u16 grant_ref_t;
    26.4  #define GNTTABOP_map_grant_ref        0
    26.5  typedef struct gnttab_map_grant_ref {
    26.6      /* IN parameters. */
    26.7 -    memory_t    host_addr;
    26.8 +    u64         host_addr;
    26.9      domid_t     dom;
   26.10      grant_ref_t ref;
   26.11      u16         flags;                /* GNTMAP_* */
   26.12      /* OUT parameters. */
   26.13      s16         handle;               /* +ve: handle; -ve: GNTST_* */
   26.14 -    memory_t    dev_bus_addr;
   26.15 +    u64         dev_bus_addr;
   26.16  } gnttab_map_grant_ref_t;
   26.17  
   26.18  /*
   26.19 @@ -176,8 +176,8 @@ typedef struct gnttab_map_grant_ref {
   26.20  #define GNTTABOP_unmap_grant_ref      1
   26.21  typedef struct gnttab_unmap_grant_ref {
   26.22      /* IN parameters. */
   26.23 -    memory_t    host_addr;
   26.24 -    memory_t    dev_bus_addr;
   26.25 +    u64         host_addr;
   26.26 +    u64         dev_bus_addr;
   26.27      u16         handle;
   26.28      /* OUT parameters. */
   26.29      s16         status;               /* GNTST_* */
   26.30 @@ -223,7 +223,7 @@ typedef struct gnttab_dump_table {
   26.31   */
   26.32  #define GNTTABOP_donate                4
   26.33  typedef struct {
   26.34 -    memory_t    mfn;		      /*  0 */
   26.35 +    unsigned long mfn;		      /*  0 */
   26.36      domid_t     domid;		      /*  4 */
   26.37      u16         handle;               /*  8 */
   26.38      s16         status;               /*  10: GNTST_* */
    27.1 --- a/xen/include/public/io/domain_controller.h	Fri Aug 19 16:46:51 2005 +0000
    27.2 +++ b/xen/include/public/io/domain_controller.h	Fri Aug 19 17:25:04 2005 +0000
    27.3 @@ -139,7 +139,7 @@ typedef struct blkif_fe_driver_status {
    27.4   */
    27.5  typedef struct blkif_fe_interface_connect {
    27.6      u32      handle;
    27.7 -    memory_t shmem_frame;
    27.8 +    unsigned long shmem_frame;
    27.9      int      shmem_ref;
   27.10  } blkif_fe_interface_connect_t;
   27.11  
   27.12 @@ -249,7 +249,7 @@ typedef struct blkif_be_connect {
   27.13      /* IN */
   27.14      domid_t    domid;         /* Domain attached to new interface.   */
   27.15      u32        blkif_handle;  /* Domain-specific interface handle.   */
   27.16 -    memory_t   shmem_frame;   /* Page cont. shared comms window.     */
   27.17 +    unsigned long shmem_frame;/* Page cont. shared comms window.     */
   27.18      int        shmem_ref;     /* Grant table reference.              */
   27.19      u32        evtchn;        /* Event channel for notifications.    */
   27.20      /* OUT */
   27.21 @@ -364,11 +364,11 @@ typedef struct netif_fe_driver_status {
   27.22   *  STATUS_CONNECTED message.
   27.23   */
   27.24  typedef struct netif_fe_interface_connect {
   27.25 -    u32        handle;
   27.26 -    memory_t   tx_shmem_frame; 
   27.27 -    int        tx_shmem_ref;
   27.28 -    memory_t   rx_shmem_frame;
   27.29 -    int        rx_shmem_ref;
   27.30 +    u32           handle;
   27.31 +    unsigned long tx_shmem_frame; 
   27.32 +    int           tx_shmem_ref;
   27.33 +    unsigned long rx_shmem_frame;
   27.34 +    int           rx_shmem_ref;
   27.35  } netif_fe_interface_connect_t;
   27.36  
   27.37  /*
   27.38 @@ -486,13 +486,13 @@ typedef struct netif_be_creditlimit {
   27.39   */
   27.40  typedef struct netif_be_connect { 
   27.41      /* IN */
   27.42 -    domid_t    domid;          /* Domain attached to new interface.   */
   27.43 -    u32        netif_handle;   /* Domain-specific interface handle.   */
   27.44 -    memory_t   tx_shmem_frame; /* Page cont. tx shared comms window.  */
   27.45 -    int        tx_shmem_ref;   /* Grant reference for above           */
   27.46 -    memory_t   rx_shmem_frame; /* Page cont. rx shared comms window.  */
   27.47 -    int        rx_shmem_ref;   /* Grant reference for above           */
   27.48 -    u16        evtchn;         /* Event channel for notifications.    */
   27.49 +    domid_t    domid;            /* Domain attached to new interface.   */
   27.50 +    u32        netif_handle;     /* Domain-specific interface handle.   */
   27.51 +    unsigned long tx_shmem_frame;/* Page cont. tx shared comms window.  */
   27.52 +    int        tx_shmem_ref;     /* Grant reference for above           */
   27.53 +    unsigned long rx_shmem_frame;/* Page cont. rx shared comms window.  */
   27.54 +    int        rx_shmem_ref;     /* Grant reference for above           */
   27.55 +    u16        evtchn;           /* Event channel for notifications.    */
   27.56      /* OUT */
   27.57      u32        status;
   27.58  } netif_be_connect_t;
   27.59 @@ -577,7 +577,7 @@ typedef struct usbif_fe_driver_status_ch
   27.60   *  STATUS_CONNECTED message.
   27.61   */
   27.62  typedef struct usbif_fe_interface_connect {
   27.63 -    memory_t shmem_frame;
   27.64 +    unsigned long shmem_frame;
   27.65  } usbif_fe_interface_connect_t;
   27.66  
   27.67  /*
   27.68 @@ -660,7 +660,7 @@ typedef struct usbif_be_destroy {
   27.69  typedef struct usbif_be_connect { 
   27.70      /* IN */
   27.71      domid_t    domid;         /* Domain attached to new interface.   */
   27.72 -    memory_t   shmem_frame;   /* Page cont. shared comms window.     */
   27.73 +    unsigned long shmem_frame;/* Page cont. shared comms window.     */
   27.74      u32        evtchn;        /* Event channel for notifications.    */
   27.75      u32        bandwidth;     /* Bandwidth allocated for isoch / int - us
   27.76                                 * per 1ms frame (ie between 0 and 900 or 800
   27.77 @@ -780,7 +780,7 @@ typedef struct pdb_Connection {
   27.78  #define PDB_CONNECTION_STATUS_UP   1
   27.79  #define PDB_CONNECTION_STATUS_DOWN 2
   27.80      u32      status;
   27.81 -    memory_t ring;       /* status: UP */
   27.82 +    unsigned long ring;  /* status: UP */
   27.83      u32      evtchn;     /* status: UP */
   27.84  } pdb_connection_t, *pdb_connection_p;
   27.85  
    28.1 --- a/xen/include/public/io/netif.h	Fri Aug 19 16:46:51 2005 +0000
    28.2 +++ b/xen/include/public/io/netif.h	Fri Aug 19 17:25:04 2005 +0000
    28.3 @@ -10,7 +10,7 @@
    28.4  #define __XEN_PUBLIC_IO_NETIF_H__
    28.5  
    28.6  typedef struct netif_tx_request {
    28.7 -    memory_t addr;   /* Machine address of packet.  */
    28.8 +    unsigned long addr;   /* Machine address of packet.  */
    28.9      u16      csum_blank:1; /* Proto csum field blank?   */
   28.10      u16      id:15;  /* Echoed in response message. */
   28.11      u16      size;   /* Packet size in bytes.       */
   28.12 @@ -32,7 +32,7 @@ typedef struct {
   28.13  #ifdef CONFIG_XEN_NETDEV_GRANT_TX
   28.14      u32      addr;   /*  0: Offset in page of start of received packet  */
   28.15  #else
   28.16 -    memory_t addr;   /* Machine address of packet.              */
   28.17 +    unsigned long addr; /* Machine address of packet.              */
   28.18  #endif
   28.19      u16      csum_valid:1; /* Protocol checksum is validated?       */
   28.20      u16      id:15;
    29.1 --- a/xen/include/public/physdev.h	Fri Aug 19 16:46:51 2005 +0000
    29.2 +++ b/xen/include/public/physdev.h	Fri Aug 19 17:25:04 2005 +0000
    29.3 @@ -27,8 +27,8 @@ typedef struct physdevop_set_iopl {
    29.4  
    29.5  typedef struct physdevop_set_iobitmap {
    29.6      /* IN */
    29.7 -    memory_t bitmap;
    29.8 -    u32      nr_ports;
    29.9 +    char *bitmap;
   29.10 +    u32   nr_ports;
   29.11  } physdevop_set_iobitmap_t;
   29.12  
   29.13  typedef struct physdevop_apic {
    30.1 --- a/xen/include/public/xen.h	Fri Aug 19 16:46:51 2005 +0000
    30.2 +++ b/xen/include/public/xen.h	Fri Aug 19 17:25:04 2005 +0000
    30.3 @@ -171,9 +171,9 @@ struct mmuext_op {
    30.4      unsigned int cmd;
    30.5      union {
    30.6          /* [UN]PIN_TABLE, NEW_BASEPTR, NEW_USER_BASEPTR, REASSIGN_PAGE */
    30.7 -        memory_t mfn;
    30.8 +        unsigned long mfn;
    30.9          /* INVLPG_LOCAL, INVLPG_ALL, SET_LDT */
   30.10 -        memory_t linear_addr;
   30.11 +        unsigned long linear_addr;
   30.12      };
   30.13      union {
   30.14          /* SET_LDT */
   30.15 @@ -438,18 +438,18 @@ typedef struct shared_info {
   30.16  #define MAX_GUEST_CMDLINE 1024
   30.17  typedef struct start_info {
   30.18      /* THE FOLLOWING ARE FILLED IN BOTH ON INITIAL BOOT AND ON RESUME.    */
   30.19 -    memory_t nr_pages;        /* Total pages allocated to this domain.    */
   30.20 -    memory_t shared_info;     /* MACHINE address of shared info struct.   */
   30.21 +    unsigned long nr_pages;   /* Total pages allocated to this domain.    */
   30.22 +    unsigned long shared_info;/* MACHINE address of shared info struct.   */
   30.23      u32      flags;           /* SIF_xxx flags.                           */
   30.24      u16      domain_controller_evtchn;
   30.25      /* THE FOLLOWING ARE ONLY FILLED IN ON INITIAL BOOT (NOT RESUME).     */
   30.26 -    memory_t pt_base;         /* VIRTUAL address of page directory.       */
   30.27 -    memory_t nr_pt_frames;    /* Number of bootstrap p.t. frames.         */
   30.28 -    memory_t mfn_list;        /* VIRTUAL address of page-frame list.      */
   30.29 -    memory_t mod_start;       /* VIRTUAL address of pre-loaded module.    */
   30.30 -    memory_t mod_len;         /* Size (bytes) of pre-loaded module.       */
   30.31 +    unsigned long pt_base;    /* VIRTUAL address of page directory.       */
   30.32 +    unsigned long nr_pt_frames;/* Number of bootstrap p.t. frames.        */
   30.33 +    unsigned long mfn_list;   /* VIRTUAL address of page-frame list.      */
   30.34 +    unsigned long mod_start;  /* VIRTUAL address of pre-loaded module.    */
   30.35 +    unsigned long mod_len;    /* Size (bytes) of pre-loaded module.       */
   30.36      s8 cmd_line[MAX_GUEST_CMDLINE];
   30.37 -    memory_t store_mfn;       /* MACHINE page number of shared page.      */
   30.38 +    unsigned long store_mfn;  /* MACHINE page number of shared page.      */
   30.39      u16      store_evtchn;    /* Event channel for store communication.   */
   30.40  } start_info_t;
   30.41