ia64/xen-unstable

changeset 6299:631cc5dc3e8a

merge?
author cl349@firebug.cl.cam.ac.uk
date Fri Aug 19 17:38:31 2005 +0000 (2005-08-19)
parents e8c2c3123ec6 0608852073c8
children 1872e09bfba3
files linux-2.6-xen-sparse/arch/xen/i386/kernel/Makefile linux-2.6-xen-sparse/arch/xen/i386/kernel/head.S linux-2.6-xen-sparse/arch/xen/i386/kernel/init_task.c 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/i386/mm/init.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/blkback/xenbus.c linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c 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 linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable.h linux-2.6-xen-sparse/include/asm-xen/xenbus.h 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/Makefile	Fri Aug 19 17:38:07 2005 +0000
     1.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/Makefile	Fri Aug 19 17:38:31 2005 +0000
     1.3 @@ -14,8 +14,7 @@ obj-y	:= process.o signal.o entry.o trap
     1.4  
     1.5  c-obj-y	:= semaphore.o vm86.o \
     1.6  		ptrace.o sys_i386.o \
     1.7 -		i387.o dmi_scan.o bootflag.o \
     1.8 -		doublefault.o
     1.9 +		i387.o dmi_scan.o bootflag.o
    1.10  s-obj-y	:=
    1.11  
    1.12  obj-y				+= cpu/
    1.13 @@ -85,7 +84,7 @@ SYSCFLAGS_vsyscall-syms.o = -r
    1.14  			$(obj)/vsyscall-sysenter.o FORCE
    1.15  	$(call if_changed,syscall)
    1.16  
    1.17 -c-link	:= init_task.o
    1.18 +c-link	:=
    1.19  s-link	:= vsyscall-int80.o vsyscall-sysenter.o vsyscall-sigreturn.o vsyscall.lds.o syscall_table.o
    1.20  
    1.21  $(patsubst %.o,$(obj)/%.c,$(c-obj-y) $(c-obj-m) $(c-link)) $(patsubst %.o,$(obj)/%.S,$(s-obj-y) $(s-link)):
     2.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/head.S	Fri Aug 19 17:38:07 2005 +0000
     2.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/head.S	Fri Aug 19 17:38:31 2005 +0000
     2.3 @@ -136,9 +136,6 @@ cpu_gdt_descr:
     2.4  ENTRY(empty_zero_page)
     2.5  
     2.6  .org 0x2000
     2.7 -ENTRY(swapper_pg_dir)
     2.8 -
     2.9 -.org 0x3000
    2.10  ENTRY(cpu_gdt_table)
    2.11  	.quad 0x0000000000000000	/* NULL descriptor */
    2.12  	.quad 0x0000000000000000	/* 0x0b reserved */
    2.13 @@ -190,10 +187,10 @@ ENTRY(cpu_gdt_table)
    2.14  	.quad 0x0000000000000000	/* 0xf8 - GDT entry 31: double-fault TSS */
    2.15  	.fill GDT_ENTRIES-32,8,0
    2.16  
    2.17 -.org 0x4000
    2.18 +.org 0x3000
    2.19  ENTRY(default_ldt)
    2.20  
    2.21 -.org 0x5000
    2.22 +.org 0x4000
    2.23  /*
    2.24   * Real beginning of normal "text" segment
    2.25   */
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/init_task.c	Fri Aug 19 17:38:31 2005 +0000
     3.3 @@ -0,0 +1,49 @@
     3.4 +#include <linux/mm.h>
     3.5 +#include <linux/module.h>
     3.6 +#include <linux/sched.h>
     3.7 +#include <linux/init.h>
     3.8 +#include <linux/init_task.h>
     3.9 +#include <linux/fs.h>
    3.10 +#include <linux/mqueue.h>
    3.11 +
    3.12 +#include <asm/uaccess.h>
    3.13 +#include <asm/pgtable.h>
    3.14 +#include <asm/desc.h>
    3.15 +
    3.16 +static struct fs_struct init_fs = INIT_FS;
    3.17 +static struct files_struct init_files = INIT_FILES;
    3.18 +static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
    3.19 +static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
    3.20 +
    3.21 +#define swapper_pg_dir ((pgd_t *)NULL)
    3.22 +struct mm_struct init_mm = INIT_MM(init_mm);
    3.23 +#undef swapper_pg_dir
    3.24 +
    3.25 +EXPORT_SYMBOL(init_mm);
    3.26 +
    3.27 +/*
    3.28 + * Initial thread structure.
    3.29 + *
    3.30 + * We need to make sure that this is THREAD_SIZE aligned due to the
    3.31 + * way process stacks are handled. This is done by having a special
    3.32 + * "init_task" linker map entry..
    3.33 + */
    3.34 +union thread_union init_thread_union 
    3.35 +	__attribute__((__section__(".data.init_task"))) =
    3.36 +		{ INIT_THREAD_INFO(init_task) };
    3.37 +
    3.38 +/*
    3.39 + * Initial task structure.
    3.40 + *
    3.41 + * All other task structs will be allocated on slabs in fork.c
    3.42 + */
    3.43 +struct task_struct init_task = INIT_TASK(init_task);
    3.44 +
    3.45 +EXPORT_SYMBOL(init_task);
    3.46 +
    3.47 +/*
    3.48 + * per-CPU TSS segments. Threads are completely 'soft' on Linux,
    3.49 + * no more per-task TSS's.
    3.50 + */ 
    3.51 +DEFINE_PER_CPU(struct tss_struct, init_tss) ____cacheline_maxaligned_in_smp = INIT_TSS;
    3.52 +
     4.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/ioport.c	Fri Aug 19 17:38:07 2005 +0000
     4.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/ioport.c	Fri Aug 19 17:38:31 2005 +0000
     4.3 @@ -80,7 +80,7 @@ asmlinkage long sys_ioperm(unsigned long
     4.4  		t->io_bitmap_ptr = bitmap;
     4.5  
     4.6  		op.cmd = PHYSDEVOP_SET_IOBITMAP;
     4.7 -		op.u.set_iobitmap.bitmap   = (unsigned long)bitmap;
     4.8 +		op.u.set_iobitmap.bitmap   = (char *)bitmap;
     4.9  		op.u.set_iobitmap.nr_ports = IO_BITMAP_BITS;
    4.10  		HYPERVISOR_physdev_op(&op);
    4.11  	}
     5.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/process.c	Fri Aug 19 17:38:07 2005 +0000
     5.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/process.c	Fri Aug 19 17:38:31 2005 +0000
     5.3 @@ -547,7 +547,7 @@ struct task_struct fastcall * __switch_t
     5.4  		iobmp_op.cmd                     =
     5.5  			PHYSDEVOP_SET_IOBITMAP;
     5.6  		iobmp_op.u.set_iobitmap.bitmap   =
     5.7 -			(unsigned long)next->io_bitmap_ptr;
     5.8 +			(char *)next->io_bitmap_ptr;
     5.9  		iobmp_op.u.set_iobitmap.nr_ports =
    5.10  			next->io_bitmap_ptr ? IO_BITMAP_BITS : 0;
    5.11  		mcl->op      = __HYPERVISOR_physdev_op;
     6.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/mm/init.c	Fri Aug 19 17:38:07 2005 +0000
     6.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/init.c	Fri Aug 19 17:38:31 2005 +0000
     6.3 @@ -342,11 +342,15 @@ unsigned long long __PAGE_KERNEL_EXEC = 
     6.4  extern void __init remap_numa_kva(void);
     6.5  #endif
     6.6  
     6.7 +pgd_t *swapper_pg_dir;
     6.8 +
     6.9  static void __init pagetable_init (void)
    6.10  {
    6.11  	unsigned long vaddr;
    6.12 -	pgd_t *pgd_base = swapper_pg_dir;
    6.13 -	pgd_t *old_pgd = (pgd_t *)xen_start_info.pt_base;
    6.14 +	pgd_t *pgd_base = (pgd_t *)xen_start_info.pt_base;
    6.15 +
    6.16 +	swapper_pg_dir = pgd_base;
    6.17 +	init_mm.pgd    = pgd_base;
    6.18  
    6.19  #ifdef CONFIG_X86_PAE
    6.20  	int i;
    6.21 @@ -367,44 +371,6 @@ static void __init pagetable_init (void)
    6.22  		__PAGE_KERNEL_EXEC |= _PAGE_GLOBAL;
    6.23  	}
    6.24  
    6.25 -	/*
    6.26 -	 * Switch to proper mm_init page directory. Initialise from the current
    6.27 -	 * page directory, write-protect the new page directory, then switch to
    6.28 -	 * it. We clean up by write-enabling and then freeing the old page dir.
    6.29 -	 */
    6.30 -#ifndef CONFIG_X86_PAE
    6.31 -	memcpy(pgd_base, old_pgd, PTRS_PER_PGD_NO_HV*sizeof(pgd_t));
    6.32 -	make_page_readonly(pgd_base);
    6.33 -	xen_pgd_pin(__pa(pgd_base));
    6.34 -	load_cr3(pgd_base);
    6.35 -	xen_pgd_unpin(__pa(old_pgd));
    6.36 -	make_page_writable(old_pgd);
    6.37 -	__flush_tlb_all();
    6.38 -	free_bootmem(__pa(old_pgd), PAGE_SIZE);
    6.39 -#else
    6.40 -	{
    6.41 -		pud_t *old_pud = pud_offset(old_pgd+3, PAGE_OFFSET);
    6.42 -		pmd_t *old_pmd = pmd_offset(old_pud, PAGE_OFFSET);
    6.43 -		pmd_t *new_pmd = alloc_bootmem_low_pages(PAGE_SIZE);
    6.44 -
    6.45 -		memcpy(new_pmd,  old_pmd, PAGE_SIZE);
    6.46 -		memcpy(pgd_base, old_pgd, PTRS_PER_PGD_NO_HV*sizeof(pgd_t));
    6.47 -		set_pgd(&pgd_base[3], __pgd(__pa(new_pmd) | _PAGE_PRESENT));
    6.48 -
    6.49 -		make_page_readonly(new_pmd);
    6.50 -		make_page_readonly(pgd_base);
    6.51 -		xen_pgd_pin(__pa(pgd_base));
    6.52 -		load_cr3(pgd_base);
    6.53 -		xen_pgd_unpin(__pa(old_pgd));
    6.54 -		make_page_writable(old_pgd);
    6.55 -		make_page_writable(old_pmd);
    6.56 -		__flush_tlb_all();
    6.57 -
    6.58 -		free_bootmem(__pa(old_pgd), PAGE_SIZE);
    6.59 -		free_bootmem(__pa(old_pmd), PAGE_SIZE);
    6.60 -	}
    6.61 -#endif
    6.62 -
    6.63  	init_mm.context.pinned = 1;
    6.64  	kernel_physical_mapping_init(pgd_base);
    6.65  	remap_numa_kva();
     7.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/process.c	Fri Aug 19 17:38:07 2005 +0000
     7.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/process.c	Fri Aug 19 17:38:31 2005 +0000
     7.3 @@ -474,7 +474,7 @@ struct task_struct *__switch_to(struct t
     7.4  		iobmp_op.cmd                     =
     7.5  			PHYSDEVOP_SET_IOBITMAP;
     7.6  		iobmp_op.u.set_iobitmap.bitmap   =
     7.7 -			(unsigned long)next->io_bitmap_ptr;
     7.8 +			(char *)next->io_bitmap_ptr;
     7.9  		iobmp_op.u.set_iobitmap.nr_ports =
    7.10  			next->io_bitmap_ptr ? IO_BITMAP_BITS : 0;
    7.11  		mcl->op      = __HYPERVISOR_physdev_op;
     8.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkback/common.h	Fri Aug 19 17:38:07 2005 +0000
     8.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkback/common.h	Fri Aug 19 17:38:31 2005 +0000
     8.3 @@ -71,7 +71,7 @@ typedef struct blkif_st {
     8.4      struct work_struct work;
     8.5  #ifdef CONFIG_XEN_BLKDEV_GRANT
     8.6      u16 shmem_handle;
     8.7 -    memory_t shmem_vaddr;
     8.8 +    unsigned long shmem_vaddr;
     8.9      grant_ref_t shmem_ref;
    8.10  #endif
    8.11  } blkif_t;
    11.1 --- a/linux-2.6-xen-sparse/drivers/xen/blktap/blktap.h	Fri Aug 19 17:38:07 2005 +0000
    11.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blktap/blktap.h	Fri Aug 19 17:38:31 2005 +0000
    11.3 @@ -87,7 +87,7 @@ typedef struct blkif_st {
    11.4      struct work_struct work;
    11.5  #ifdef CONFIG_XEN_BLKDEV_GRANT
    11.6      u16 shmem_handle;
    11.7 -    memory_t shmem_vaddr;
    11.8 +    unsigned long shmem_vaddr;
    11.9      grant_ref_t shmem_ref;
   11.10  #endif
   11.11  } blkif_t;
    12.1 --- a/linux-2.6-xen-sparse/drivers/xen/netback/common.h	Fri Aug 19 17:38:07 2005 +0000
    12.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/common.h	Fri Aug 19 17:38:31 2005 +0000
    12.3 @@ -49,13 +49,13 @@ typedef struct netif_st {
    12.4      unsigned long    tx_shmem_frame;
    12.5  #ifdef CONFIG_XEN_NETDEV_GRANT_TX
    12.6      u16              tx_shmem_handle;
    12.7 -    memory_t         tx_shmem_vaddr; 
    12.8 +    unsigned long    tx_shmem_vaddr; 
    12.9      grant_ref_t      tx_shmem_ref; 
   12.10  #endif
   12.11      unsigned long    rx_shmem_frame;
   12.12  #ifdef CONFIG_XEN_NETDEV_GRANT_RX
   12.13      u16              rx_shmem_handle;
   12.14 -    memory_t         rx_shmem_vaddr; 
   12.15 +    unsigned long    rx_shmem_vaddr; 
   12.16      grant_ref_t      rx_shmem_ref; 
   12.17  #endif
   12.18      unsigned int     evtchn;
    13.1 --- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c	Fri Aug 19 17:38:07 2005 +0000
    13.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c	Fri Aug 19 17:38:31 2005 +0000
    13.3 @@ -43,7 +43,7 @@ static void make_tx_response(netif_t *ne
    13.4  static int  make_rx_response(netif_t *netif, 
    13.5                               u16      id, 
    13.6                               s8       st,
    13.7 -                             memory_t addr,
    13.8 +                             unsigned long addr,
    13.9                               u16      size,
   13.10                               u16      csum_valid);
   13.11  
   13.12 @@ -887,7 +887,7 @@ static void make_tx_response(netif_t *ne
   13.13  static int make_rx_response(netif_t *netif, 
   13.14                              u16      id, 
   13.15                              s8       st,
   13.16 -                            memory_t addr,
   13.17 +                            unsigned long addr,
   13.18                              u16      size,
   13.19                              u16      csum_valid)
   13.20  {
    14.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable.h	Fri Aug 19 17:38:07 2005 +0000
    14.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable.h	Fri Aug 19 17:38:31 2005 +0000
    14.3 @@ -32,7 +32,7 @@
    14.4   */
    14.5  #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
    14.6  extern unsigned long empty_zero_page[1024];
    14.7 -extern pgd_t swapper_pg_dir[1024];
    14.8 +extern pgd_t *swapper_pg_dir;
    14.9  extern kmem_cache_t *pgd_cache;
   14.10  extern kmem_cache_t *pmd_cache;
   14.11  extern spinlock_t pgd_lock;
    16.1 --- a/tools/debugger/libxendebug/xendebug.c	Fri Aug 19 17:38:07 2005 +0000
    16.2 +++ b/tools/debugger/libxendebug/xendebug.c	Fri Aug 19 17:38:31 2005 +0000
    16.3 @@ -40,7 +40,7 @@ typedef int boolean;
    16.4  typedef struct bwcpoint                           /* break/watch/catch point */
    16.5  {
    16.6      struct list_head list;
    16.7 -    memory_t address;
    16.8 +    unsigned long address;
    16.9      u32 domain;
   16.10      u8 old_value;                             /* old value for software bkpt */
   16.11  } bwcpoint_t, *bwcpoint_p;
   16.12 @@ -311,7 +311,7 @@ xendebug_continue(int xc_handle,
   16.13  /* access to one page */
   16.14  static int
   16.15  xendebug_memory_page (domain_context_p ctxt, int xc_handle, u32 vcpu,
   16.16 -                      int protection, memory_t address, int length, u8 *buffer)
   16.17 +                      int protection, unsigned long address, int length, u8 *buffer)
   16.18  {
   16.19      vcpu_guest_context_t *vcpu_ctxt = &ctxt->context[vcpu];
   16.20      unsigned long pde, page;
   16.21 @@ -407,7 +407,7 @@ xendebug_memory_page (domain_context_p c
   16.22  /* divide a memory operation into accesses to individual pages */
   16.23  static int
   16.24  xendebug_memory_op (domain_context_p ctxt, int xc_handle, u32 vcpu,
   16.25 -                    int protection, memory_t address, int length, u8 *buffer)
   16.26 +                    int protection, unsigned long address, int length, u8 *buffer)
   16.27  {
   16.28      int      remain;              /* number of bytes to touch past this page */
   16.29      int      bytes   = 0;
   16.30 @@ -431,7 +431,7 @@ int
   16.31  xendebug_read_memory(int xc_handle,
   16.32                       u32 domid,
   16.33                       u32 vcpu,
   16.34 -                     memory_t address,
   16.35 +                     unsigned long address,
   16.36                       u32 length,
   16.37                       u8 *data)
   16.38  {
   16.39 @@ -451,7 +451,7 @@ int
   16.40  xendebug_write_memory(int xc_handle,
   16.41                        u32 domid,
   16.42                        u32 vcpu,
   16.43 -                      memory_t address,
   16.44 +                      unsigned long address,
   16.45                        u32 length,
   16.46                        u8 *data)
   16.47  {
   16.48 @@ -471,7 +471,7 @@ int
   16.49  xendebug_insert_memory_breakpoint(int xc_handle,
   16.50                                    u32 domid,
   16.51                                    u32 vcpu,
   16.52 -                                  memory_t address,
   16.53 +                                  unsigned long address,
   16.54                                    u32 length)
   16.55  {
   16.56      bwcpoint_p bkpt;
   16.57 @@ -517,7 +517,7 @@ int
   16.58  xendebug_remove_memory_breakpoint(int xc_handle,
   16.59                                    u32 domid,
   16.60                                    u32 vcpu,
   16.61 -                                  memory_t address,
   16.62 +                                  unsigned long address,
   16.63                                    u32 length)
   16.64  {
   16.65      bwcpoint_p bkpt = NULL;
    17.1 --- a/tools/debugger/libxendebug/xendebug.h	Fri Aug 19 17:38:07 2005 +0000
    17.2 +++ b/tools/debugger/libxendebug/xendebug.h	Fri Aug 19 17:38:31 2005 +0000
    17.3 @@ -45,7 +45,7 @@ int xendebug_continue(int xc_handle,
    17.4  int xendebug_read_memory(int xc_handle,
    17.5  			 u32 domid,
    17.6  			 u32 vcpu,
    17.7 -			 memory_t address,
    17.8 +			 unsigned long address,
    17.9  			 u32 length,
   17.10  			 u8 *data);
   17.11  
   17.12 @@ -53,7 +53,7 @@ int xendebug_read_memory(int xc_handle,
   17.13  int xendebug_write_memory(int xc_handle,
   17.14  			  u32 domid,
   17.15  			  u32 vcpu,
   17.16 -			  memory_t address,
   17.17 +			  unsigned long address,
   17.18  			  u32 length,
   17.19  			  u8 *data);
   17.20  
   17.21 @@ -61,13 +61,13 @@ int xendebug_write_memory(int xc_handle,
   17.22  int xendebug_insert_memory_breakpoint(int xc_handle,
   17.23  				      u32 domid,
   17.24  				      u32 vcpu,
   17.25 -				      memory_t address,
   17.26 +				      unsigned long address,
   17.27  				      u32 length);
   17.28  
   17.29  int xendebug_remove_memory_breakpoint(int xc_handle,
   17.30  				      u32 domid,
   17.31  				      u32 vcpu,
   17.32 -				      memory_t address,
   17.33 +				      unsigned long address,
   17.34  				      u32 length);
   17.35  
   17.36  int xendebug_query_domain_stop(int xc_handle,
    18.1 --- a/tools/debugger/pdb/linux-2.6-module/debug.c	Fri Aug 19 17:38:07 2005 +0000
    18.2 +++ b/tools/debugger/pdb/linux-2.6-module/debug.c	Fri Aug 19 17:38:31 2005 +0000
    18.3 @@ -26,7 +26,7 @@ static int pdb_page_fault_fn (struct pt_
    18.4  typedef struct bwcpoint                           /* break/watch/catch point */
    18.5  {
    18.6      struct list_head list;
    18.7 -    memory_t address;
    18.8 +    unsigned long address;
    18.9      int length;
   18.10  
   18.11      u8  type;                                                     /* BWC_??? */
   18.12 @@ -109,7 +109,7 @@ pdb_bwc_print_list (void)
   18.13  }
   18.14  
   18.15  bwcpoint_p
   18.16 -pdb_search_watchpoint (u32 process, memory_t address)
   18.17 +pdb_search_watchpoint (u32 process, unsigned long address)
   18.18  {
   18.19      bwcpoint_p bwc_watch = (bwcpoint_p) 0;
   18.20      bwcpoint_p bwc_entry = (bwcpoint_p) 0;
   18.21 @@ -364,7 +364,7 @@ pdb_step (struct task_struct *target)
   18.22  
   18.23  int
   18.24  pdb_insert_memory_breakpoint (struct task_struct *target, 
   18.25 -                              memory_t address, u32 length)
   18.26 +                              unsigned long address, u32 length)
   18.27  {
   18.28      int rc = 0;
   18.29      bwcpoint_p bkpt;
   18.30 @@ -399,7 +399,7 @@ pdb_insert_memory_breakpoint (struct tas
   18.31  
   18.32  int
   18.33  pdb_remove_memory_breakpoint (struct task_struct *target,
   18.34 -                              memory_t address, u32 length)
   18.35 +                              unsigned long address, u32 length)
   18.36  {
   18.37      int rc = 0;
   18.38      bwcpoint_p bkpt = NULL;
   18.39 @@ -760,7 +760,7 @@ pdb_int3_fn (struct pt_regs *regs, long 
   18.40  {
   18.41      pdb_response_t resp;
   18.42      bwcpoint_p bkpt = NULL;
   18.43 -    memory_t address = regs->eip - 1;
   18.44 +    unsigned long address = regs->eip - 1;
   18.45  
   18.46      struct list_head *entry;
   18.47      list_for_each(entry, &bwcpoint_list)
    19.1 --- a/tools/debugger/pdb/linux-2.6-module/module.c	Fri Aug 19 17:38:07 2005 +0000
    19.2 +++ b/tools/debugger/pdb/linux-2.6-module/module.c	Fri Aug 19 17:38:31 2005 +0000
    19.3 @@ -199,7 +199,7 @@ pdb_interrupt (int irq, void *dev_id, st
    19.4  }
    19.5  
    19.6  static void
    19.7 -pdb_send_connection_status(int status, memory_t ring)
    19.8 +pdb_send_connection_status(int status, unsigned long ring)
    19.9  {
   19.10      ctrl_msg_t cmsg = 
   19.11      {
    20.1 --- a/tools/debugger/pdb/linux-2.6-module/pdb_debug.h	Fri Aug 19 17:38:07 2005 +0000
    20.2 +++ b/tools/debugger/pdb/linux-2.6-module/pdb_debug.h	Fri Aug 19 17:38:31 2005 +0000
    20.3 @@ -18,9 +18,9 @@ int pdb_continue (struct task_struct *ta
    20.4  int pdb_step (struct task_struct *target);
    20.5  
    20.6  int pdb_insert_memory_breakpoint (struct task_struct *target, 
    20.7 -                                  memory_t address, u32 length);
    20.8 +                                  unsigned long address, u32 length);
    20.9  int pdb_remove_memory_breakpoint (struct task_struct *target,
   20.10 -                                  memory_t address, u32 length);
   20.11 +                                  unsigned long address, u32 length);
   20.12  int pdb_insert_watchpoint (struct task_struct *target,
   20.13                             pdb_op_watchpt_p watchpt);
   20.14  int pdb_remove_watchpoint (struct task_struct *target,
    21.1 --- a/tools/debugger/pdb/pdb_caml_domain.c	Fri Aug 19 17:38:07 2005 +0000
    21.2 +++ b/tools/debugger/pdb/pdb_caml_domain.c	Fri Aug 19 17:38:31 2005 +0000
    21.3 @@ -203,7 +203,7 @@ dom_read_memory (value context, value ad
    21.4      context_t ctx;
    21.5      int loop;
    21.6      char *buffer;
    21.7 -    memory_t my_address = Int32_val(address);
    21.8 +    unsigned long my_address = Int32_val(address);
    21.9      u32 my_length = Int_val(length);
   21.10  
   21.11      printf ("(pdb) read memory\n");
   21.12 @@ -259,7 +259,7 @@ dom_write_memory (value context, value a
   21.13      context_t ctx;
   21.14  
   21.15      char buffer[4096];  /* a big buffer */
   21.16 -    memory_t  my_address;
   21.17 +    unsigned long  my_address;
   21.18      u32 length = 0;
   21.19  
   21.20      printf ("(pdb) write memory\n");
   21.21 @@ -279,7 +279,7 @@ dom_write_memory (value context, value a
   21.22      }
   21.23      buffer[length++] = Int_val(Field(node, 0));
   21.24  
   21.25 -    my_address = (memory_t) Int32_val(address);
   21.26 +    my_address = (unsigned long) Int32_val(address);
   21.27  
   21.28      if ( xendebug_write_memory(xc_handle, ctx.domain, ctx.vcpu,
   21.29                                 my_address, length, buffer) )
   21.30 @@ -344,7 +344,7 @@ dom_insert_memory_breakpoint (value cont
   21.31      CAMLparam3(context, address, length);
   21.32  
   21.33      context_t ctx;
   21.34 -    memory_t my_address = (memory_t) Int32_val(address);
   21.35 +    unsigned long my_address = (unsigned long) Int32_val(address);
   21.36      int my_length = Int_val(length);
   21.37  
   21.38      decode_context(&ctx, context);
   21.39 @@ -373,7 +373,7 @@ dom_remove_memory_breakpoint (value cont
   21.40  
   21.41      context_t ctx;
   21.42  
   21.43 -    memory_t my_address = (memory_t) Int32_val(address);
   21.44 +    unsigned long my_address = (unsigned long) Int32_val(address);
   21.45      int my_length = Int_val(length);
   21.46  
   21.47      printf ("(pdb) remove memory breakpoint 0x%lx %d\n",
    22.1 --- a/tools/debugger/pdb/pdb_caml_process.c	Fri Aug 19 17:38:07 2005 +0000
    22.2 +++ b/tools/debugger/pdb/pdb_caml_process.c	Fri Aug 19 17:38:31 2005 +0000
    22.3 @@ -495,7 +495,7 @@ proc_insert_memory_breakpoint (value con
    22.4  
    22.5      req.operation = PDB_OPCODE_SET_BKPT;
    22.6      req.process = ctx.process;
    22.7 -    req.u.bkpt.address = (memory_t) Int32_val(address);
    22.8 +    req.u.bkpt.address = (unsigned long) Int32_val(address);
    22.9      req.u.bkpt.length  =  Int_val(length);
   22.10  
   22.11      send_request(ctx.ring, ctx.evtchn, &req);
   22.12 @@ -518,7 +518,7 @@ proc_remove_memory_breakpoint (value con
   22.13  
   22.14      req.operation = PDB_OPCODE_CLR_BKPT;
   22.15      req.process = ctx.process;
   22.16 -    req.u.bkpt.address = (memory_t) Int32_val(address);
   22.17 +    req.u.bkpt.address = (unsigned long) Int32_val(address);
   22.18      req.u.bkpt.length  =  Int_val(length);
   22.19  
   22.20      send_request(ctx.ring, ctx.evtchn, &req);
   22.21 @@ -542,7 +542,7 @@ proc_insert_watchpoint (value context, v
   22.22      req.operation = PDB_OPCODE_SET_WATCHPT;
   22.23      req.process = ctx.process;
   22.24      req.u.watchpt.type    =  Int_val(kind);
   22.25 -    req.u.watchpt.address = (memory_t) Int32_val(address);
   22.26 +    req.u.watchpt.address = (unsigned long) Int32_val(address);
   22.27      req.u.watchpt.length  =  Int_val(length);
   22.28  
   22.29      send_request(ctx.ring, ctx.evtchn, &req);
   22.30 @@ -566,7 +566,7 @@ proc_remove_watchpoint (value context, v
   22.31      req.operation = PDB_OPCODE_CLR_WATCHPT;
   22.32      req.process = ctx.process;
   22.33      req.u.watchpt.type    =  Int_val(kind);
   22.34 -    req.u.watchpt.address = (memory_t) Int32_val(address);
   22.35 +    req.u.watchpt.address = (unsigned long) Int32_val(address);
   22.36      req.u.watchpt.length  =  Int_val(length);
   22.37  
   22.38      send_request(ctx.ring, ctx.evtchn, &req);
    23.1 --- a/tools/debugger/pdb/pdb_caml_xcs.c	Fri Aug 19 17:38:07 2005 +0000
    23.2 +++ b/tools/debugger/pdb/pdb_caml_xcs.c	Fri Aug 19 17:38:31 2005 +0000
    23.3 @@ -50,7 +50,7 @@ xcs_initialize_ring (value domain, value
    23.4  {
    23.5      CAMLparam2(domain, ring);
    23.6      int my_domain = Int_val(domain);
    23.7 -    memory_t my_ring = Int32_val(ring);
    23.8 +    unsigned long my_ring = Int32_val(ring);
    23.9  
   23.10      pdb_front_ring_t *front_ring;
   23.11      pdb_sring_t *sring;
    24.1 --- a/tools/libxc/xc.h	Fri Aug 19 17:38:07 2005 +0000
    24.2 +++ b/tools/libxc/xc.h	Fri Aug 19 17:38:31 2005 +0000
    24.3 @@ -515,25 +515,25 @@ int xc_grant_interface_open(void);
    24.4   */
    24.5  int xc_grant_interface_close(int xc_handle);
    24.6  
    24.7 -int xc_gnttab_map_grant_ref(int         xc_handle,
    24.8 -                            memory_t    host_virt_addr,
    24.9 -                            u32         dom,
   24.10 -                            u16         ref,
   24.11 -                            u16         flags,
   24.12 -                            s16        *handle,
   24.13 -                            memory_t   *dev_bus_addr);
   24.14 +int xc_gnttab_map_grant_ref(int  xc_handle,
   24.15 +                            u64  host_virt_addr,
   24.16 +                            u32  dom,
   24.17 +                            u16  ref,
   24.18 +                            u16  flags,
   24.19 +                            s16 *handle,
   24.20 +                            u64 *dev_bus_addr);
   24.21  
   24.22 -int xc_gnttab_unmap_grant_ref(int       xc_handle,
   24.23 -                              memory_t  host_virt_addr,
   24.24 -                              memory_t  dev_bus_addr,
   24.25 -                              u16       handle,
   24.26 -                              s16      *status);
   24.27 +int xc_gnttab_unmap_grant_ref(int  xc_handle,
   24.28 +                              u64  host_virt_addr,
   24.29 +                              u64  dev_bus_addr,
   24.30 +                              u16  handle,
   24.31 +                              s16 *status);
   24.32  
   24.33  int xc_gnttab_setup_table(int        xc_handle,
   24.34                            u32        dom,
   24.35                            u16        nr_frames,
   24.36                            s16       *status,
   24.37 -                          memory_t **frame_list);
   24.38 +                          unsigned long **frame_list);
   24.39  
   24.40  /* Grant debug builds only: */
   24.41  int xc_gnttab_dump_table(int        xc_handle,
    25.1 --- a/tools/libxc/xc_gnttab.c	Fri Aug 19 17:38:07 2005 +0000
    25.2 +++ b/tools/libxc/xc_gnttab.c	Fri Aug 19 17:38:31 2005 +0000
    25.3 @@ -40,12 +40,12 @@ do_gnttab_op(int xc_handle,
    25.4  
    25.5  
    25.6  int xc_gnttab_map_grant_ref(int         xc_handle,
    25.7 -                            memory_t    host_virt_addr,
    25.8 +                            u64    host_virt_addr,
    25.9                              u32         dom,
   25.10                              u16         ref,
   25.11                              u16         flags,
   25.12                              s16        *handle,
   25.13 -                            memory_t   *dev_bus_addr)
   25.14 +                            u64   *dev_bus_addr)
   25.15  {
   25.16      struct gnttab_map_grant_ref op;
   25.17      int rc;
   25.18 @@ -67,8 +67,8 @@ int xc_gnttab_map_grant_ref(int         
   25.19  
   25.20  
   25.21  int xc_gnttab_unmap_grant_ref(int       xc_handle,
   25.22 -                              memory_t  host_virt_addr,
   25.23 -                              memory_t  dev_bus_addr,
   25.24 +                              u64  host_virt_addr,
   25.25 +                              u64  dev_bus_addr,
   25.26                                u16       handle,
   25.27                                s16      *status)
   25.28  {
   25.29 @@ -92,7 +92,7 @@ int xc_gnttab_setup_table(int        xc_
   25.30                            u32        dom,
   25.31                            u16        nr_frames,
   25.32                            s16       *status,
   25.33 -                          memory_t **frame_list)
   25.34 +                          unsigned long **frame_list)
   25.35  {
   25.36      struct gnttab_setup_table op;
   25.37      int rc, i;
    26.1 --- a/tools/python/xen/lowlevel/xu/xu.c	Fri Aug 19 17:38:07 2005 +0000
    26.2 +++ b/tools/python/xen/lowlevel/xu/xu.c	Fri Aug 19 17:38:31 2005 +0000
    26.3 @@ -844,7 +844,7 @@ static PyObject *xu_message_new(PyObject
    26.4      case TYPE(CMSG_BLKIF_BE, CMSG_BLKIF_BE_CONNECT):
    26.5          P2C(blkif_be_connect_t, domid,        u32);
    26.6          P2C(blkif_be_connect_t, blkif_handle, u32);
    26.7 -        P2C(blkif_be_connect_t, shmem_frame,  memory_t);
    26.8 +        P2C(blkif_be_connect_t, shmem_frame,  unsigned long);
    26.9          P2C(blkif_be_connect_t, shmem_ref,    u32);
   26.10          P2C(blkif_be_connect_t, evtchn,       u16);
   26.11          break;
   26.12 @@ -906,9 +906,9 @@ static PyObject *xu_message_new(PyObject
   26.13      case TYPE(CMSG_NETIF_BE, CMSG_NETIF_BE_CONNECT):
   26.14          P2C(netif_be_connect_t, domid,          u32);
   26.15          P2C(netif_be_connect_t, netif_handle,   u32);
   26.16 -        P2C(netif_be_connect_t, tx_shmem_frame, memory_t);
   26.17 +        P2C(netif_be_connect_t, tx_shmem_frame, unsigned long);
   26.18          P2C(netif_be_connect_t, tx_shmem_ref,   u32); 
   26.19 -        P2C(netif_be_connect_t, rx_shmem_frame, memory_t);
   26.20 +        P2C(netif_be_connect_t, rx_shmem_frame, unsigned long);
   26.21          P2C(netif_be_connect_t, rx_shmem_ref,   u32); 
   26.22          P2C(netif_be_connect_t, evtchn,         u16); 
   26.23          break;
   26.24 @@ -942,7 +942,7 @@ static PyObject *xu_message_new(PyObject
   26.25          P2C(usbif_fe_driver_status_changed_t, status, u32);
   26.26          break;
   26.27      case TYPE(CMSG_USBIF_FE, CMSG_USBIF_FE_INTERFACE_CONNECT):
   26.28 -        P2C(usbif_fe_interface_connect_t, shmem_frame, memory_t);
   26.29 +        P2C(usbif_fe_interface_connect_t, shmem_frame, unsigned long);
   26.30          break;
   26.31      case TYPE(CMSG_USBIF_FE, CMSG_USBIF_FE_INTERFACE_DISCONNECT):
   26.32          break;
   26.33 @@ -956,7 +956,7 @@ static PyObject *xu_message_new(PyObject
   26.34          break;
   26.35      case TYPE(CMSG_USBIF_BE, CMSG_USBIF_BE_CONNECT):
   26.36          P2C(usbif_be_connect_t, domid, domid_t);
   26.37 -        P2C(usbif_be_connect_t, shmem_frame, memory_t);
   26.38 +        P2C(usbif_be_connect_t, shmem_frame, unsigned long);
   26.39          P2C(usbif_be_connect_t, evtchn, u32);
   26.40          P2C(usbif_be_connect_t, bandwidth, u32);
   26.41          P2C(usbif_be_connect_t, status, u32);
    27.1 --- a/tools/xentrace/xentrace.c	Fri Aug 19 17:38:07 2005 +0000
    27.2 +++ b/tools/xentrace/xentrace.c	Fri Aug 19 17:38:31 2005 +0000
    27.3 @@ -95,13 +95,13 @@ void write_rec(unsigned int cpu, struct 
    27.4  
    27.5  /**
    27.6   * get_tbufs - get pointer to and size of the trace buffers
    27.7 - * @mach_addr: location to store machine address if the trace buffers to
    27.8 - * @size:      location to store the size of a trace buffer to
    27.9 + * @mfn:  location to store mfn of the trace buffers to
   27.10 + * @size: location to store the size of a trace buffer to
   27.11   *
   27.12   * Gets the machine address of the trace pointer area and the size of the
   27.13   * per CPU buffers.
   27.14   */
   27.15 -void get_tbufs(unsigned long *mach_addr, unsigned long *size)
   27.16 +void get_tbufs(unsigned long *mfn, unsigned long *size)
   27.17  {
   27.18      int ret;
   27.19      dom0_op_t op;                        /* dom0 op we'll build             */
   27.20 @@ -121,19 +121,19 @@ void get_tbufs(unsigned long *mach_addr,
   27.21          exit(EXIT_FAILURE);
   27.22      }
   27.23  
   27.24 -    *mach_addr = op.u.tbufcontrol.mach_addr;
   27.25 -    *size      = op.u.tbufcontrol.size;
   27.26 +    *mfn  = op.u.tbufcontrol.buffer_mfn;
   27.27 +    *size = op.u.tbufcontrol.size;
   27.28  }
   27.29  
   27.30  /**
   27.31   * map_tbufs - memory map Xen trace buffers into user space
   27.32 - * @tbufs:     machine address of the trace buffers
   27.33 + * @tbufs_mfn: mfn of the trace buffers
   27.34   * @num:       number of trace buffers to map
   27.35   * @size:      size of each trace buffer
   27.36   *
   27.37   * Maps the Xen trace buffers them into process address space.
   27.38   */
   27.39 -struct t_buf *map_tbufs(unsigned long tbufs_mach, unsigned int num,
   27.40 +struct t_buf *map_tbufs(unsigned long tbufs_mfn, unsigned int num,
   27.41                          unsigned long size)
   27.42  {
   27.43      int xc_handle;                  /* file descriptor for /proc/xen/privcmd */
   27.44 @@ -149,7 +149,7 @@ struct t_buf *map_tbufs(unsigned long tb
   27.45  
   27.46      tbufs_mapped = xc_map_foreign_range(xc_handle, 0 /* Dom 0 ID */,
   27.47                                          size * num, PROT_READ,
   27.48 -                                        tbufs_mach >> PAGE_SHIFT);
   27.49 +                                        tbufs_mfn);
   27.50  
   27.51      xc_interface_close(xc_handle);
   27.52  
   27.53 @@ -231,7 +231,7 @@ struct t_buf **init_bufs_ptrs(void *bufs
   27.54  
   27.55  /**
   27.56   * init_rec_ptrs - initialises data area pointers to locations in user space
   27.57 - * @tbufs_mach:    machine base address of the trace buffer area
   27.58 + * @tbufs_mfn:     base mfn of the trace buffer area
   27.59   * @tbufs_mapped:  user virtual address of base of trace buffer area
   27.60   * @meta:          array of user-space pointers to struct t_buf's of metadata
   27.61   * @num:           number of trace buffers
   27.62 @@ -240,7 +240,7 @@ struct t_buf **init_bufs_ptrs(void *bufs
   27.63   * mapped in user space.  Note that the trace buffer metadata contains machine
   27.64   * pointers - the array returned allows more convenient access to them.
   27.65   */
   27.66 -struct t_rec **init_rec_ptrs(unsigned long tbufs_mach,
   27.67 +struct t_rec **init_rec_ptrs(unsigned long tbufs_mfn,
   27.68                               struct t_buf *tbufs_mapped,
   27.69                               struct t_buf **meta,
   27.70                               unsigned int num)
   27.71 @@ -256,7 +256,7 @@ struct t_rec **init_rec_ptrs(unsigned lo
   27.72      }
   27.73  
   27.74      for ( i = 0; i < num; i++ )
   27.75 -        data[i] = (struct t_rec *)(meta[i]->rec_addr - tbufs_mach
   27.76 +        data[i] = (struct t_rec *)(meta[i]->rec_addr - (tbufs_mfn<<XC_PAGE_SHIFT) /* XXX */
   27.77                                     + (unsigned long)tbufs_mapped);
   27.78  
   27.79      return data;
   27.80 @@ -330,7 +330,7 @@ int monitor_tbufs(FILE *logfile)
   27.81      struct t_rec **data;         /* pointers to the trace buffer data areas
   27.82                                    * where they are mapped into user space.   */
   27.83      unsigned long *cons;         /* store tail indexes for the trace buffers */
   27.84 -    unsigned long tbufs_mach;    /* machine address of the tbufs             */
   27.85 +    unsigned long tbufs_mfn;     /* mfn of the tbufs                         */
   27.86      unsigned int  num;           /* number of trace buffers / logical CPUS   */
   27.87      unsigned long size;          /* size of a single trace buffer            */
   27.88  
   27.89 @@ -340,14 +340,14 @@ int monitor_tbufs(FILE *logfile)
   27.90      num = get_num_cpus();
   27.91  
   27.92      /* setup access to trace buffers */
   27.93 -    get_tbufs(&tbufs_mach, &size);
   27.94 -    tbufs_mapped = map_tbufs(tbufs_mach, num, size);
   27.95 +    get_tbufs(&tbufs_mfn, &size);
   27.96 +    tbufs_mapped = map_tbufs(tbufs_mfn, num, size);
   27.97  
   27.98      size_in_recs = (size - sizeof(struct t_buf)) / sizeof(struct t_rec);
   27.99  
  27.100      /* build arrays of convenience ptrs */
  27.101      meta  = init_bufs_ptrs (tbufs_mapped, num, size);
  27.102 -    data  = init_rec_ptrs  (tbufs_mach, tbufs_mapped, meta, num);
  27.103 +    data  = init_rec_ptrs  (tbufs_mfn, tbufs_mapped, meta, num);
  27.104      cons  = init_tail_idxs (meta, num);
  27.105  
  27.106      /* now, scan buffers for events */
    28.1 --- a/xen/arch/x86/physdev.c	Fri Aug 19 17:38:07 2005 +0000
    28.2 +++ b/xen/arch/x86/physdev.c	Fri Aug 19 17:38:31 2005 +0000
    28.3 @@ -106,7 +106,7 @@ long do_physdev_op(physdev_op_t *uop)
    28.4               (op.u.set_iobitmap.nr_ports > 65536) )
    28.5              break;
    28.6          ret = 0;
    28.7 -        current->arch.iobmp       = (u8 *)op.u.set_iobitmap.bitmap;
    28.8 +        current->arch.iobmp       = op.u.set_iobitmap.bitmap;
    28.9          current->arch.iobmp_limit = op.u.set_iobitmap.nr_ports;
   28.10          break;
   28.11      default:
    29.1 --- a/xen/common/trace.c	Fri Aug 19 17:38:07 2005 +0000
    29.2 +++ b/xen/common/trace.c	Fri Aug 19 17:38:31 2005 +0000
    29.3 @@ -113,10 +113,10 @@ int tb_control(dom0_tbufcontrol_t *tbc)
    29.4      switch ( tbc->op)
    29.5      {
    29.6      case DOM0_TBUF_GET_INFO:
    29.7 -        tbc->cpu_mask  = tb_cpu_mask;
    29.8 -        tbc->evt_mask  = tb_event_mask;
    29.9 -        tbc->mach_addr = __pa(t_bufs[0]);
   29.10 -        tbc->size      = opt_tbuf_size * PAGE_SIZE;
   29.11 +        tbc->cpu_mask   = tb_cpu_mask;
   29.12 +        tbc->evt_mask   = tb_event_mask;
   29.13 +        tbc->buffer_mfn = __pa(t_bufs[0]) >> PAGE_SHIFT;
   29.14 +        tbc->size       = opt_tbuf_size * PAGE_SIZE;
   29.15          break;
   29.16      case DOM0_TBUF_SET_CPU_MASK:
   29.17          tb_cpu_mask = tbc->cpu_mask;
    30.1 --- a/xen/include/public/arch-ia64.h	Fri Aug 19 17:38:07 2005 +0000
    30.2 +++ b/xen/include/public/arch-ia64.h	Fri Aug 19 17:38:31 2005 +0000
    30.3 @@ -13,9 +13,6 @@
    30.4  
    30.5  #ifndef __ASSEMBLY__
    30.6  
    30.7 -/* NB. Both the following are 64 bits each. */
    30.8 -typedef unsigned long memory_t;   /* Full-sized pointer/address/memory-size. */
    30.9 -
   30.10  #define MAX_NR_SECTION  32  // at most 32 memory holes
   30.11  typedef struct {
   30.12      unsigned long	start; 	/* start of memory hole */
    31.1 --- a/xen/include/public/arch-x86_32.h	Fri Aug 19 17:38:07 2005 +0000
    31.2 +++ b/xen/include/public/arch-x86_32.h	Fri Aug 19 17:38:31 2005 +0000
    31.3 @@ -63,9 +63,6 @@
    31.4  
    31.5  #ifndef __ASSEMBLY__
    31.6  
    31.7 -/* NB. Both the following are 32 bits each. */
    31.8 -typedef unsigned long memory_t;   /* Full-sized pointer/address/memory-size. */
    31.9 -
   31.10  /*
   31.11   * Send an array of these to HYPERVISOR_set_trap_table()
   31.12   */
   31.13 @@ -74,10 +71,10 @@ typedef unsigned long memory_t;   /* Ful
   31.14  #define TI_SET_DPL(_ti,_dpl) ((_ti)->flags |= (_dpl))
   31.15  #define TI_SET_IF(_ti,_if)   ((_ti)->flags |= ((!!(_if))<<2))
   31.16  typedef struct trap_info {
   31.17 -    u8       vector;  /* exception vector                              */
   31.18 -    u8       flags;   /* 0-3: privilege level; 4: clear event enable?  */
   31.19 -    u16      cs;      /* code selector                                 */
   31.20 -    memory_t address; /* code address                                  */
   31.21 +    u8       vector;       /* exception vector                              */
   31.22 +    u8       flags;        /* 0-3: privilege level; 4: clear event enable?  */
   31.23 +    u16      cs;           /* code selector                                 */
   31.24 +    unsigned long address; /* code offset                                   */
   31.25  } trap_info_t;
   31.26  
   31.27  typedef struct cpu_user_regs {
    32.1 --- a/xen/include/public/arch-x86_64.h	Fri Aug 19 17:38:07 2005 +0000
    32.2 +++ b/xen/include/public/arch-x86_64.h	Fri Aug 19 17:38:31 2005 +0000
    32.3 @@ -103,9 +103,6 @@ struct switch_to_user {
    32.4      /* Bottom of switch_to_user stack frame. */
    32.5  };
    32.6  
    32.7 -/* NB. Both the following are 64 bits each. */
    32.8 -typedef unsigned long memory_t;   /* Full-sized pointer/address/memory-size. */
    32.9 -
   32.10  /*
   32.11   * Send an array of these to HYPERVISOR_set_trap_table().
   32.12   * N.B. As in x86/32 mode, the privilege level specifies which modes may enter
   32.13 @@ -121,10 +118,10 @@ typedef unsigned long memory_t;   /* Ful
   32.14  #define TI_SET_DPL(_ti,_dpl) ((_ti)->flags |= (_dpl))
   32.15  #define TI_SET_IF(_ti,_if)   ((_ti)->flags |= ((!!(_if))<<2))
   32.16  typedef struct trap_info {
   32.17 -    u8       vector;  /* exception vector                              */
   32.18 -    u8       flags;   /* 0-3: privilege level; 4: clear event enable?  */
   32.19 -    u16      cs;      /* code selector                                 */
   32.20 -    memory_t address; /* code address                                  */
   32.21 +    u8       vector;       /* exception vector                              */
   32.22 +    u8       flags;        /* 0-3: privilege level; 4: clear event enable?  */
   32.23 +    u16      cs;           /* code selector                                 */
   32.24 +    unsigned long address; /* code offset                                   */
   32.25  } trap_info_t;
   32.26  
   32.27  typedef struct cpu_user_regs {
    33.1 --- a/xen/include/public/dom0_ops.h	Fri Aug 19 17:38:07 2005 +0000
    33.2 +++ b/xen/include/public/dom0_ops.h	Fri Aug 19 17:38:31 2005 +0000
    33.3 @@ -19,7 +19,7 @@
    33.4   * This makes sure that old versions of dom0 tools will stop working in a
    33.5   * well-defined way (rather than crashing the machine, for instance).
    33.6   */
    33.7 -#define DOM0_INTERFACE_VERSION   0xAAAA100E
    33.8 +#define DOM0_INTERFACE_VERSION   0xAAAA100F
    33.9  
   33.10  /************************************************************************/
   33.11  
   33.12 @@ -27,10 +27,10 @@
   33.13  typedef struct {
   33.14      /* IN variables. */
   33.15      domid_t       domain;
   33.16 -    memory_t      max_pfns;
   33.17 +    unsigned long max_pfns;
   33.18      void         *buffer;
   33.19      /* OUT variables. */
   33.20 -    memory_t      num_pfns;
   33.21 +    unsigned long num_pfns;
   33.22  } dom0_getmemlist_t;
   33.23  
   33.24  #define DOM0_SCHEDCTL          6
   33.25 @@ -83,9 +83,9 @@ typedef struct {
   33.26  #define DOMFLAGS_SHUTDOWNMASK 255 /* DOMFLAGS_SHUTDOWN guest-supplied code.  */
   33.27  #define DOMFLAGS_SHUTDOWNSHIFT 16
   33.28      u32      flags;
   33.29 -    memory_t tot_pages;
   33.30 -    memory_t max_pages;
   33.31 -    memory_t shared_info_frame;       /* MFN of shared_info struct */
   33.32 +    unsigned long tot_pages;
   33.33 +    unsigned long max_pages;
   33.34 +    unsigned long shared_info_frame;       /* MFN of shared_info struct */
   33.35      u64      cpu_time;
   33.36      u32      n_vcpu;
   33.37      s32      vcpu_to_cpu[MAX_VIRT_CPUS];  /* current mapping   */
   33.38 @@ -155,7 +155,7 @@ typedef struct {
   33.39  
   33.40  typedef struct {
   33.41      /* IN variables. */
   33.42 -    memory_t pfn;          /* Machine page frame number to query.       */
   33.43 +    unsigned long pfn;     /* Machine page frame number to query.       */
   33.44      domid_t domain;        /* To which domain does the frame belong?    */
   33.45      /* OUT variables. */
   33.46      /* Is the page PINNED to a type? */
   33.47 @@ -197,7 +197,7 @@ typedef struct {
   33.48      unsigned long cpu_mask;
   33.49      u32           evt_mask;
   33.50      /* OUT variables */
   33.51 -    memory_t mach_addr;
   33.52 +    unsigned long buffer_mfn;
   33.53      u32      size;
   33.54  } dom0_tbufcontrol_t;
   33.55  
   33.56 @@ -211,8 +211,8 @@ typedef struct {
   33.57      u32      sockets_per_node;
   33.58      u32      nr_nodes;
   33.59      u32      cpu_khz;
   33.60 -    memory_t total_pages;
   33.61 -    memory_t free_pages;
   33.62 +    unsigned long total_pages;
   33.63 +    unsigned long free_pages;
   33.64  } dom0_physinfo_t;
   33.65  
   33.66  /*
   33.67 @@ -252,7 +252,7 @@ typedef struct {
   33.68      u32            op;
   33.69      unsigned long *dirty_bitmap; /* pointer to locked buffer */
   33.70      /* IN/OUT variables. */
   33.71 -    memory_t       pages;        /* size of buffer, updated with actual size */
   33.72 +    unsigned long  pages;        /* size of buffer, updated with actual size */
   33.73      /* OUT variables. */
   33.74      dom0_shadow_control_stats_t stats;
   33.75  } dom0_shadow_control_t;
   33.76 @@ -260,15 +260,15 @@ typedef struct {
   33.77  #define DOM0_SETDOMAINMAXMEM   28
   33.78  typedef struct {
   33.79      /* IN variables. */
   33.80 -    domid_t     domain;
   33.81 -    memory_t    max_memkb;
   33.82 +    domid_t       domain;
   33.83 +    unsigned long max_memkb;
   33.84  } dom0_setdomainmaxmem_t;
   33.85  
   33.86  #define DOM0_GETPAGEFRAMEINFO2 29   /* batched interface */
   33.87  typedef struct {
   33.88      /* IN variables. */
   33.89 -    domid_t  domain;
   33.90 -    memory_t num;
   33.91 +    domid_t        domain;
   33.92 +    unsigned long  num;
   33.93      /* IN/OUT variables. */
   33.94      unsigned long *array;
   33.95  } dom0_getpageframeinfo2_t;
   33.96 @@ -283,12 +283,12 @@ typedef struct {
   33.97  #define DOM0_ADD_MEMTYPE         31
   33.98  typedef struct {
   33.99      /* IN variables. */
  33.100 -    memory_t pfn;
  33.101 -    memory_t nr_pfns;
  33.102 -    u32      type;
  33.103 +    unsigned long pfn;
  33.104 +    unsigned long nr_pfns;
  33.105 +    u32           type;
  33.106      /* OUT variables. */
  33.107 -    u32      handle;
  33.108 -    u32      reg;
  33.109 +    u32           handle;
  33.110 +    u32           reg;
  33.111  } dom0_add_memtype_t;
  33.112  
  33.113  /*
  33.114 @@ -311,8 +311,8 @@ typedef struct {
  33.115      /* IN variables. */
  33.116      u32      reg;
  33.117      /* OUT variables. */
  33.118 -    memory_t pfn;
  33.119 -    memory_t nr_pfns;
  33.120 +    unsigned long pfn;
  33.121 +    unsigned long nr_pfns;
  33.122      u32      type;
  33.123  } dom0_read_memtype_t;
  33.124  
  33.125 @@ -361,10 +361,10 @@ typedef struct {
  33.126  typedef struct {
  33.127      /* IN variables. */
  33.128      domid_t               first_domain;
  33.129 -    memory_t              max_domains;
  33.130 +    unsigned int          max_domains;
  33.131      dom0_getdomaininfo_t *buffer;
  33.132      /* OUT variables. */
  33.133 -    memory_t              num_domains;
  33.134 +    unsigned int          num_domains;
  33.135  } dom0_getdomaininfolist_t;
  33.136  
  33.137  #define DOM0_PLATFORM_QUIRK      39  
    34.1 --- a/xen/include/public/grant_table.h	Fri Aug 19 17:38:07 2005 +0000
    34.2 +++ b/xen/include/public/grant_table.h	Fri Aug 19 17:38:31 2005 +0000
    34.3 @@ -153,13 +153,13 @@ typedef u16 grant_ref_t;
    34.4  #define GNTTABOP_map_grant_ref        0
    34.5  typedef struct gnttab_map_grant_ref {
    34.6      /* IN parameters. */
    34.7 -    memory_t    host_addr;
    34.8 +    u64         host_addr;
    34.9      domid_t     dom;
   34.10      grant_ref_t ref;
   34.11      u16         flags;                /* GNTMAP_* */
   34.12      /* OUT parameters. */
   34.13      s16         handle;               /* +ve: handle; -ve: GNTST_* */
   34.14 -    memory_t    dev_bus_addr;
   34.15 +    u64         dev_bus_addr;
   34.16  } gnttab_map_grant_ref_t;
   34.17  
   34.18  /*
   34.19 @@ -176,8 +176,8 @@ typedef struct gnttab_map_grant_ref {
   34.20  #define GNTTABOP_unmap_grant_ref      1
   34.21  typedef struct gnttab_unmap_grant_ref {
   34.22      /* IN parameters. */
   34.23 -    memory_t    host_addr;
   34.24 -    memory_t    dev_bus_addr;
   34.25 +    u64         host_addr;
   34.26 +    u64         dev_bus_addr;
   34.27      u16         handle;
   34.28      /* OUT parameters. */
   34.29      s16         status;               /* GNTST_* */
   34.30 @@ -223,7 +223,7 @@ typedef struct gnttab_dump_table {
   34.31   */
   34.32  #define GNTTABOP_donate                4
   34.33  typedef struct {
   34.34 -    memory_t    mfn;		      /*  0 */
   34.35 +    unsigned long mfn;		      /*  0 */
   34.36      domid_t     domid;		      /*  4 */
   34.37      u16         handle;               /*  8 */
   34.38      s16         status;               /*  10: GNTST_* */
    35.1 --- a/xen/include/public/io/domain_controller.h	Fri Aug 19 17:38:07 2005 +0000
    35.2 +++ b/xen/include/public/io/domain_controller.h	Fri Aug 19 17:38:31 2005 +0000
    35.3 @@ -139,7 +139,7 @@ typedef struct blkif_fe_driver_status {
    35.4   */
    35.5  typedef struct blkif_fe_interface_connect {
    35.6      u32      handle;
    35.7 -    memory_t shmem_frame;
    35.8 +    unsigned long shmem_frame;
    35.9      int      shmem_ref;
   35.10  } blkif_fe_interface_connect_t;
   35.11  
   35.12 @@ -249,7 +249,7 @@ typedef struct blkif_be_connect {
   35.13      /* IN */
   35.14      domid_t    domid;         /* Domain attached to new interface.   */
   35.15      u32        blkif_handle;  /* Domain-specific interface handle.   */
   35.16 -    memory_t   shmem_frame;   /* Page cont. shared comms window.     */
   35.17 +    unsigned long shmem_frame;/* Page cont. shared comms window.     */
   35.18      int        shmem_ref;     /* Grant table reference.              */
   35.19      u32        evtchn;        /* Event channel for notifications.    */
   35.20      /* OUT */
   35.21 @@ -364,11 +364,11 @@ typedef struct netif_fe_driver_status {
   35.22   *  STATUS_CONNECTED message.
   35.23   */
   35.24  typedef struct netif_fe_interface_connect {
   35.25 -    u32        handle;
   35.26 -    memory_t   tx_shmem_frame; 
   35.27 -    int        tx_shmem_ref;
   35.28 -    memory_t   rx_shmem_frame;
   35.29 -    int        rx_shmem_ref;
   35.30 +    u32           handle;
   35.31 +    unsigned long tx_shmem_frame; 
   35.32 +    int           tx_shmem_ref;
   35.33 +    unsigned long rx_shmem_frame;
   35.34 +    int           rx_shmem_ref;
   35.35  } netif_fe_interface_connect_t;
   35.36  
   35.37  /*
   35.38 @@ -486,13 +486,13 @@ typedef struct netif_be_creditlimit {
   35.39   */
   35.40  typedef struct netif_be_connect { 
   35.41      /* IN */
   35.42 -    domid_t    domid;          /* Domain attached to new interface.   */
   35.43 -    u32        netif_handle;   /* Domain-specific interface handle.   */
   35.44 -    memory_t   tx_shmem_frame; /* Page cont. tx shared comms window.  */
   35.45 -    int        tx_shmem_ref;   /* Grant reference for above           */
   35.46 -    memory_t   rx_shmem_frame; /* Page cont. rx shared comms window.  */
   35.47 -    int        rx_shmem_ref;   /* Grant reference for above           */
   35.48 -    u16        evtchn;         /* Event channel for notifications.    */
   35.49 +    domid_t    domid;            /* Domain attached to new interface.   */
   35.50 +    u32        netif_handle;     /* Domain-specific interface handle.   */
   35.51 +    unsigned long tx_shmem_frame;/* Page cont. tx shared comms window.  */
   35.52 +    int        tx_shmem_ref;     /* Grant reference for above           */
   35.53 +    unsigned long rx_shmem_frame;/* Page cont. rx shared comms window.  */
   35.54 +    int        rx_shmem_ref;     /* Grant reference for above           */
   35.55 +    u16        evtchn;           /* Event channel for notifications.    */
   35.56      /* OUT */
   35.57      u32        status;
   35.58  } netif_be_connect_t;
   35.59 @@ -577,7 +577,7 @@ typedef struct usbif_fe_driver_status_ch
   35.60   *  STATUS_CONNECTED message.
   35.61   */
   35.62  typedef struct usbif_fe_interface_connect {
   35.63 -    memory_t shmem_frame;
   35.64 +    unsigned long shmem_frame;
   35.65  } usbif_fe_interface_connect_t;
   35.66  
   35.67  /*
   35.68 @@ -660,7 +660,7 @@ typedef struct usbif_be_destroy {
   35.69  typedef struct usbif_be_connect { 
   35.70      /* IN */
   35.71      domid_t    domid;         /* Domain attached to new interface.   */
   35.72 -    memory_t   shmem_frame;   /* Page cont. shared comms window.     */
   35.73 +    unsigned long shmem_frame;/* Page cont. shared comms window.     */
   35.74      u32        evtchn;        /* Event channel for notifications.    */
   35.75      u32        bandwidth;     /* Bandwidth allocated for isoch / int - us
   35.76                                 * per 1ms frame (ie between 0 and 900 or 800
   35.77 @@ -780,7 +780,7 @@ typedef struct pdb_Connection {
   35.78  #define PDB_CONNECTION_STATUS_UP   1
   35.79  #define PDB_CONNECTION_STATUS_DOWN 2
   35.80      u32      status;
   35.81 -    memory_t ring;       /* status: UP */
   35.82 +    unsigned long ring;  /* status: UP */
   35.83      u32      evtchn;     /* status: UP */
   35.84  } pdb_connection_t, *pdb_connection_p;
   35.85  
    36.1 --- a/xen/include/public/io/netif.h	Fri Aug 19 17:38:07 2005 +0000
    36.2 +++ b/xen/include/public/io/netif.h	Fri Aug 19 17:38:31 2005 +0000
    36.3 @@ -10,7 +10,7 @@
    36.4  #define __XEN_PUBLIC_IO_NETIF_H__
    36.5  
    36.6  typedef struct netif_tx_request {
    36.7 -    memory_t addr;   /* Machine address of packet.  */
    36.8 +    unsigned long addr;   /* Machine address of packet.  */
    36.9      u16      csum_blank:1; /* Proto csum field blank?   */
   36.10      u16      id:15;  /* Echoed in response message. */
   36.11      u16      size;   /* Packet size in bytes.       */
   36.12 @@ -32,7 +32,7 @@ typedef struct {
   36.13  #ifdef CONFIG_XEN_NETDEV_GRANT_TX
   36.14      u32      addr;   /*  0: Offset in page of start of received packet  */
   36.15  #else
   36.16 -    memory_t addr;   /* Machine address of packet.              */
   36.17 +    unsigned long addr; /* Machine address of packet.              */
   36.18  #endif
   36.19      u16      csum_valid:1; /* Protocol checksum is validated?       */
   36.20      u16      id:15;
    37.1 --- a/xen/include/public/physdev.h	Fri Aug 19 17:38:07 2005 +0000
    37.2 +++ b/xen/include/public/physdev.h	Fri Aug 19 17:38:31 2005 +0000
    37.3 @@ -27,8 +27,8 @@ typedef struct physdevop_set_iopl {
    37.4  
    37.5  typedef struct physdevop_set_iobitmap {
    37.6      /* IN */
    37.7 -    memory_t bitmap;
    37.8 -    u32      nr_ports;
    37.9 +    char *bitmap;
   37.10 +    u32   nr_ports;
   37.11  } physdevop_set_iobitmap_t;
   37.12  
   37.13  typedef struct physdevop_apic {
    38.1 --- a/xen/include/public/xen.h	Fri Aug 19 17:38:07 2005 +0000
    38.2 +++ b/xen/include/public/xen.h	Fri Aug 19 17:38:31 2005 +0000
    38.3 @@ -171,9 +171,9 @@ struct mmuext_op {
    38.4      unsigned int cmd;
    38.5      union {
    38.6          /* [UN]PIN_TABLE, NEW_BASEPTR, NEW_USER_BASEPTR, REASSIGN_PAGE */
    38.7 -        memory_t mfn;
    38.8 +        unsigned long mfn;
    38.9          /* INVLPG_LOCAL, INVLPG_ALL, SET_LDT */
   38.10 -        memory_t linear_addr;
   38.11 +        unsigned long linear_addr;
   38.12      };
   38.13      union {
   38.14          /* SET_LDT */
   38.15 @@ -438,18 +438,18 @@ typedef struct shared_info {
   38.16  #define MAX_GUEST_CMDLINE 1024
   38.17  typedef struct start_info {
   38.18      /* THE FOLLOWING ARE FILLED IN BOTH ON INITIAL BOOT AND ON RESUME.    */
   38.19 -    memory_t nr_pages;        /* Total pages allocated to this domain.    */
   38.20 -    memory_t shared_info;     /* MACHINE address of shared info struct.   */
   38.21 +    unsigned long nr_pages;   /* Total pages allocated to this domain.    */
   38.22 +    unsigned long shared_info;/* MACHINE address of shared info struct.   */
   38.23      u32      flags;           /* SIF_xxx flags.                           */
   38.24      u16      domain_controller_evtchn;
   38.25      /* THE FOLLOWING ARE ONLY FILLED IN ON INITIAL BOOT (NOT RESUME).     */
   38.26 -    memory_t pt_base;         /* VIRTUAL address of page directory.       */
   38.27 -    memory_t nr_pt_frames;    /* Number of bootstrap p.t. frames.         */
   38.28 -    memory_t mfn_list;        /* VIRTUAL address of page-frame list.      */
   38.29 -    memory_t mod_start;       /* VIRTUAL address of pre-loaded module.    */
   38.30 -    memory_t mod_len;         /* Size (bytes) of pre-loaded module.       */
   38.31 +    unsigned long pt_base;    /* VIRTUAL address of page directory.       */
   38.32 +    unsigned long nr_pt_frames;/* Number of bootstrap p.t. frames.        */
   38.33 +    unsigned long mfn_list;   /* VIRTUAL address of page-frame list.      */
   38.34 +    unsigned long mod_start;  /* VIRTUAL address of pre-loaded module.    */
   38.35 +    unsigned long mod_len;    /* Size (bytes) of pre-loaded module.       */
   38.36      s8 cmd_line[MAX_GUEST_CMDLINE];
   38.37 -    memory_t store_mfn;       /* MACHINE page number of shared page.      */
   38.38 +    unsigned long store_mfn;  /* MACHINE page number of shared page.      */
   38.39      u16      store_evtchn;    /* Event channel for store communication.   */
   38.40  } start_info_t;
   38.41