[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Get rid of memory_t. Almost all uses should be unsigned long.
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID 0608852073c86cfa432ac32cb9223531950be896 # Parent 74044b8186a9b66eeeb684915e741c0ed9ed0e8b 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@xxxxxxxxxxxxx> diff -r 74044b8186a9 -r 0608852073c8 linux-2.6-xen-sparse/arch/xen/i386/kernel/ioport.c --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/ioport.c Fri Aug 19 16:46:51 2005 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/ioport.c Fri Aug 19 17:25:04 2005 @@ -80,7 +80,7 @@ t->io_bitmap_ptr = bitmap; op.cmd = PHYSDEVOP_SET_IOBITMAP; - op.u.set_iobitmap.bitmap = (unsigned long)bitmap; + op.u.set_iobitmap.bitmap = (char *)bitmap; op.u.set_iobitmap.nr_ports = IO_BITMAP_BITS; HYPERVISOR_physdev_op(&op); } diff -r 74044b8186a9 -r 0608852073c8 linux-2.6-xen-sparse/arch/xen/i386/kernel/process.c --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/process.c Fri Aug 19 16:46:51 2005 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/process.c Fri Aug 19 17:25:04 2005 @@ -547,7 +547,7 @@ iobmp_op.cmd = PHYSDEVOP_SET_IOBITMAP; iobmp_op.u.set_iobitmap.bitmap = - (unsigned long)next->io_bitmap_ptr; + (char *)next->io_bitmap_ptr; iobmp_op.u.set_iobitmap.nr_ports = next->io_bitmap_ptr ? IO_BITMAP_BITS : 0; mcl->op = __HYPERVISOR_physdev_op; diff -r 74044b8186a9 -r 0608852073c8 linux-2.6-xen-sparse/arch/xen/x86_64/kernel/process.c --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/process.c Fri Aug 19 16:46:51 2005 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/process.c Fri Aug 19 17:25:04 2005 @@ -474,7 +474,7 @@ iobmp_op.cmd = PHYSDEVOP_SET_IOBITMAP; iobmp_op.u.set_iobitmap.bitmap = - (unsigned long)next->io_bitmap_ptr; + (char *)next->io_bitmap_ptr; iobmp_op.u.set_iobitmap.nr_ports = next->io_bitmap_ptr ? IO_BITMAP_BITS : 0; mcl->op = __HYPERVISOR_physdev_op; diff -r 74044b8186a9 -r 0608852073c8 linux-2.6-xen-sparse/drivers/xen/blkback/common.h --- a/linux-2.6-xen-sparse/drivers/xen/blkback/common.h Fri Aug 19 16:46:51 2005 +++ b/linux-2.6-xen-sparse/drivers/xen/blkback/common.h Fri Aug 19 17:25:04 2005 @@ -71,7 +71,7 @@ struct work_struct work; #ifdef CONFIG_XEN_BLKDEV_GRANT u16 shmem_handle; - memory_t shmem_vaddr; + unsigned long shmem_vaddr; grant_ref_t shmem_ref; #endif } blkif_t; diff -r 74044b8186a9 -r 0608852073c8 linux-2.6-xen-sparse/drivers/xen/blktap/blktap.h --- a/linux-2.6-xen-sparse/drivers/xen/blktap/blktap.h Fri Aug 19 16:46:51 2005 +++ b/linux-2.6-xen-sparse/drivers/xen/blktap/blktap.h Fri Aug 19 17:25:04 2005 @@ -87,7 +87,7 @@ struct work_struct work; #ifdef CONFIG_XEN_BLKDEV_GRANT u16 shmem_handle; - memory_t shmem_vaddr; + unsigned long shmem_vaddr; grant_ref_t shmem_ref; #endif } blkif_t; diff -r 74044b8186a9 -r 0608852073c8 linux-2.6-xen-sparse/drivers/xen/netback/common.h --- a/linux-2.6-xen-sparse/drivers/xen/netback/common.h Fri Aug 19 16:46:51 2005 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/common.h Fri Aug 19 17:25:04 2005 @@ -49,13 +49,13 @@ unsigned long tx_shmem_frame; #ifdef CONFIG_XEN_NETDEV_GRANT_TX u16 tx_shmem_handle; - memory_t tx_shmem_vaddr; + unsigned long tx_shmem_vaddr; grant_ref_t tx_shmem_ref; #endif unsigned long rx_shmem_frame; #ifdef CONFIG_XEN_NETDEV_GRANT_RX u16 rx_shmem_handle; - memory_t rx_shmem_vaddr; + unsigned long rx_shmem_vaddr; grant_ref_t rx_shmem_ref; #endif unsigned int evtchn; diff -r 74044b8186a9 -r 0608852073c8 linux-2.6-xen-sparse/drivers/xen/netback/netback.c --- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c Fri Aug 19 16:46:51 2005 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c Fri Aug 19 17:25:04 2005 @@ -43,7 +43,7 @@ static int make_rx_response(netif_t *netif, u16 id, s8 st, - memory_t addr, + unsigned long addr, u16 size, u16 csum_valid); @@ -887,7 +887,7 @@ static int make_rx_response(netif_t *netif, u16 id, s8 st, - memory_t addr, + unsigned long addr, u16 size, u16 csum_valid) { diff -r 74044b8186a9 -r 0608852073c8 tools/debugger/libxendebug/xendebug.c --- a/tools/debugger/libxendebug/xendebug.c Fri Aug 19 16:46:51 2005 +++ b/tools/debugger/libxendebug/xendebug.c Fri Aug 19 17:25:04 2005 @@ -40,7 +40,7 @@ typedef struct bwcpoint /* break/watch/catch point */ { struct list_head list; - memory_t address; + unsigned long address; u32 domain; u8 old_value; /* old value for software bkpt */ } bwcpoint_t, *bwcpoint_p; @@ -311,7 +311,7 @@ /* access to one page */ static int xendebug_memory_page (domain_context_p ctxt, int xc_handle, u32 vcpu, - int protection, memory_t address, int length, u8 *buffer) + int protection, unsigned long address, int length, u8 *buffer) { vcpu_guest_context_t *vcpu_ctxt = &ctxt->context[vcpu]; unsigned long pde, page; @@ -407,7 +407,7 @@ /* divide a memory operation into accesses to individual pages */ static int xendebug_memory_op (domain_context_p ctxt, int xc_handle, u32 vcpu, - int protection, memory_t address, int length, u8 *buffer) + int protection, unsigned long address, int length, u8 *buffer) { int remain; /* number of bytes to touch past this page */ int bytes = 0; @@ -431,7 +431,7 @@ xendebug_read_memory(int xc_handle, u32 domid, u32 vcpu, - memory_t address, + unsigned long address, u32 length, u8 *data) { @@ -451,7 +451,7 @@ xendebug_write_memory(int xc_handle, u32 domid, u32 vcpu, - memory_t address, + unsigned long address, u32 length, u8 *data) { @@ -471,7 +471,7 @@ xendebug_insert_memory_breakpoint(int xc_handle, u32 domid, u32 vcpu, - memory_t address, + unsigned long address, u32 length) { bwcpoint_p bkpt; @@ -517,7 +517,7 @@ xendebug_remove_memory_breakpoint(int xc_handle, u32 domid, u32 vcpu, - memory_t address, + unsigned long address, u32 length) { bwcpoint_p bkpt = NULL; diff -r 74044b8186a9 -r 0608852073c8 tools/debugger/libxendebug/xendebug.h --- a/tools/debugger/libxendebug/xendebug.h Fri Aug 19 16:46:51 2005 +++ b/tools/debugger/libxendebug/xendebug.h Fri Aug 19 17:25:04 2005 @@ -45,7 +45,7 @@ int xendebug_read_memory(int xc_handle, u32 domid, u32 vcpu, - memory_t address, + unsigned long address, u32 length, u8 *data); @@ -53,7 +53,7 @@ int xendebug_write_memory(int xc_handle, u32 domid, u32 vcpu, - memory_t address, + unsigned long address, u32 length, u8 *data); @@ -61,13 +61,13 @@ int xendebug_insert_memory_breakpoint(int xc_handle, u32 domid, u32 vcpu, - memory_t address, + unsigned long address, u32 length); int xendebug_remove_memory_breakpoint(int xc_handle, u32 domid, u32 vcpu, - memory_t address, + unsigned long address, u32 length); int xendebug_query_domain_stop(int xc_handle, diff -r 74044b8186a9 -r 0608852073c8 tools/debugger/pdb/linux-2.6-module/debug.c --- a/tools/debugger/pdb/linux-2.6-module/debug.c Fri Aug 19 16:46:51 2005 +++ b/tools/debugger/pdb/linux-2.6-module/debug.c Fri Aug 19 17:25:04 2005 @@ -26,7 +26,7 @@ typedef struct bwcpoint /* break/watch/catch point */ { struct list_head list; - memory_t address; + unsigned long address; int length; u8 type; /* BWC_??? */ @@ -109,7 +109,7 @@ } bwcpoint_p -pdb_search_watchpoint (u32 process, memory_t address) +pdb_search_watchpoint (u32 process, unsigned long address) { bwcpoint_p bwc_watch = (bwcpoint_p) 0; bwcpoint_p bwc_entry = (bwcpoint_p) 0; @@ -364,7 +364,7 @@ int pdb_insert_memory_breakpoint (struct task_struct *target, - memory_t address, u32 length) + unsigned long address, u32 length) { int rc = 0; bwcpoint_p bkpt; @@ -399,7 +399,7 @@ int pdb_remove_memory_breakpoint (struct task_struct *target, - memory_t address, u32 length) + unsigned long address, u32 length) { int rc = 0; bwcpoint_p bkpt = NULL; @@ -760,7 +760,7 @@ { pdb_response_t resp; bwcpoint_p bkpt = NULL; - memory_t address = regs->eip - 1; + unsigned long address = regs->eip - 1; struct list_head *entry; list_for_each(entry, &bwcpoint_list) diff -r 74044b8186a9 -r 0608852073c8 tools/debugger/pdb/linux-2.6-module/module.c --- a/tools/debugger/pdb/linux-2.6-module/module.c Fri Aug 19 16:46:51 2005 +++ b/tools/debugger/pdb/linux-2.6-module/module.c Fri Aug 19 17:25:04 2005 @@ -199,7 +199,7 @@ } static void -pdb_send_connection_status(int status, memory_t ring) +pdb_send_connection_status(int status, unsigned long ring) { ctrl_msg_t cmsg = { diff -r 74044b8186a9 -r 0608852073c8 tools/debugger/pdb/linux-2.6-module/pdb_debug.h --- a/tools/debugger/pdb/linux-2.6-module/pdb_debug.h Fri Aug 19 16:46:51 2005 +++ b/tools/debugger/pdb/linux-2.6-module/pdb_debug.h Fri Aug 19 17:25:04 2005 @@ -18,9 +18,9 @@ int pdb_step (struct task_struct *target); int pdb_insert_memory_breakpoint (struct task_struct *target, - memory_t address, u32 length); + unsigned long address, u32 length); int pdb_remove_memory_breakpoint (struct task_struct *target, - memory_t address, u32 length); + unsigned long address, u32 length); int pdb_insert_watchpoint (struct task_struct *target, pdb_op_watchpt_p watchpt); int pdb_remove_watchpoint (struct task_struct *target, diff -r 74044b8186a9 -r 0608852073c8 tools/debugger/pdb/pdb_caml_domain.c --- a/tools/debugger/pdb/pdb_caml_domain.c Fri Aug 19 16:46:51 2005 +++ b/tools/debugger/pdb/pdb_caml_domain.c Fri Aug 19 17:25:04 2005 @@ -203,7 +203,7 @@ context_t ctx; int loop; char *buffer; - memory_t my_address = Int32_val(address); + unsigned long my_address = Int32_val(address); u32 my_length = Int_val(length); printf ("(pdb) read memory\n"); @@ -259,7 +259,7 @@ context_t ctx; char buffer[4096]; /* a big buffer */ - memory_t my_address; + unsigned long my_address; u32 length = 0; printf ("(pdb) write memory\n"); @@ -279,7 +279,7 @@ } buffer[length++] = Int_val(Field(node, 0)); - my_address = (memory_t) Int32_val(address); + my_address = (unsigned long) Int32_val(address); if ( xendebug_write_memory(xc_handle, ctx.domain, ctx.vcpu, my_address, length, buffer) ) @@ -344,7 +344,7 @@ CAMLparam3(context, address, length); context_t ctx; - memory_t my_address = (memory_t) Int32_val(address); + unsigned long my_address = (unsigned long) Int32_val(address); int my_length = Int_val(length); decode_context(&ctx, context); @@ -373,7 +373,7 @@ context_t ctx; - memory_t my_address = (memory_t) Int32_val(address); + unsigned long my_address = (unsigned long) Int32_val(address); int my_length = Int_val(length); printf ("(pdb) remove memory breakpoint 0x%lx %d\n", diff -r 74044b8186a9 -r 0608852073c8 tools/debugger/pdb/pdb_caml_process.c --- a/tools/debugger/pdb/pdb_caml_process.c Fri Aug 19 16:46:51 2005 +++ b/tools/debugger/pdb/pdb_caml_process.c Fri Aug 19 17:25:04 2005 @@ -495,7 +495,7 @@ req.operation = PDB_OPCODE_SET_BKPT; req.process = ctx.process; - req.u.bkpt.address = (memory_t) Int32_val(address); + req.u.bkpt.address = (unsigned long) Int32_val(address); req.u.bkpt.length = Int_val(length); send_request(ctx.ring, ctx.evtchn, &req); @@ -518,7 +518,7 @@ req.operation = PDB_OPCODE_CLR_BKPT; req.process = ctx.process; - req.u.bkpt.address = (memory_t) Int32_val(address); + req.u.bkpt.address = (unsigned long) Int32_val(address); req.u.bkpt.length = Int_val(length); send_request(ctx.ring, ctx.evtchn, &req); @@ -542,7 +542,7 @@ req.operation = PDB_OPCODE_SET_WATCHPT; req.process = ctx.process; req.u.watchpt.type = Int_val(kind); - req.u.watchpt.address = (memory_t) Int32_val(address); + req.u.watchpt.address = (unsigned long) Int32_val(address); req.u.watchpt.length = Int_val(length); send_request(ctx.ring, ctx.evtchn, &req); @@ -566,7 +566,7 @@ req.operation = PDB_OPCODE_CLR_WATCHPT; req.process = ctx.process; req.u.watchpt.type = Int_val(kind); - req.u.watchpt.address = (memory_t) Int32_val(address); + req.u.watchpt.address = (unsigned long) Int32_val(address); req.u.watchpt.length = Int_val(length); send_request(ctx.ring, ctx.evtchn, &req); diff -r 74044b8186a9 -r 0608852073c8 tools/debugger/pdb/pdb_caml_xcs.c --- a/tools/debugger/pdb/pdb_caml_xcs.c Fri Aug 19 16:46:51 2005 +++ b/tools/debugger/pdb/pdb_caml_xcs.c Fri Aug 19 17:25:04 2005 @@ -50,7 +50,7 @@ { CAMLparam2(domain, ring); int my_domain = Int_val(domain); - memory_t my_ring = Int32_val(ring); + unsigned long my_ring = Int32_val(ring); pdb_front_ring_t *front_ring; pdb_sring_t *sring; diff -r 74044b8186a9 -r 0608852073c8 tools/libxc/xc.h --- a/tools/libxc/xc.h Fri Aug 19 16:46:51 2005 +++ b/tools/libxc/xc.h Fri Aug 19 17:25:04 2005 @@ -515,25 +515,25 @@ */ int xc_grant_interface_close(int xc_handle); -int xc_gnttab_map_grant_ref(int xc_handle, - memory_t host_virt_addr, - u32 dom, - u16 ref, - u16 flags, - s16 *handle, - memory_t *dev_bus_addr); - -int xc_gnttab_unmap_grant_ref(int xc_handle, - memory_t host_virt_addr, - memory_t dev_bus_addr, - u16 handle, - s16 *status); +int xc_gnttab_map_grant_ref(int xc_handle, + u64 host_virt_addr, + u32 dom, + u16 ref, + u16 flags, + s16 *handle, + u64 *dev_bus_addr); + +int xc_gnttab_unmap_grant_ref(int xc_handle, + u64 host_virt_addr, + u64 dev_bus_addr, + u16 handle, + s16 *status); int xc_gnttab_setup_table(int xc_handle, u32 dom, u16 nr_frames, s16 *status, - memory_t **frame_list); + unsigned long **frame_list); /* Grant debug builds only: */ int xc_gnttab_dump_table(int xc_handle, diff -r 74044b8186a9 -r 0608852073c8 tools/libxc/xc_gnttab.c --- a/tools/libxc/xc_gnttab.c Fri Aug 19 16:46:51 2005 +++ b/tools/libxc/xc_gnttab.c Fri Aug 19 17:25:04 2005 @@ -40,12 +40,12 @@ int xc_gnttab_map_grant_ref(int xc_handle, - memory_t host_virt_addr, + u64 host_virt_addr, u32 dom, u16 ref, u16 flags, s16 *handle, - memory_t *dev_bus_addr) + u64 *dev_bus_addr) { struct gnttab_map_grant_ref op; int rc; @@ -67,8 +67,8 @@ int xc_gnttab_unmap_grant_ref(int xc_handle, - memory_t host_virt_addr, - memory_t dev_bus_addr, + u64 host_virt_addr, + u64 dev_bus_addr, u16 handle, s16 *status) { @@ -92,7 +92,7 @@ u32 dom, u16 nr_frames, s16 *status, - memory_t **frame_list) + unsigned long **frame_list) { struct gnttab_setup_table op; int rc, i; diff -r 74044b8186a9 -r 0608852073c8 tools/python/xen/lowlevel/xu/xu.c --- a/tools/python/xen/lowlevel/xu/xu.c Fri Aug 19 16:46:51 2005 +++ b/tools/python/xen/lowlevel/xu/xu.c Fri Aug 19 17:25:04 2005 @@ -844,7 +844,7 @@ case TYPE(CMSG_BLKIF_BE, CMSG_BLKIF_BE_CONNECT): P2C(blkif_be_connect_t, domid, u32); P2C(blkif_be_connect_t, blkif_handle, u32); - P2C(blkif_be_connect_t, shmem_frame, memory_t); + P2C(blkif_be_connect_t, shmem_frame, unsigned long); P2C(blkif_be_connect_t, shmem_ref, u32); P2C(blkif_be_connect_t, evtchn, u16); break; @@ -906,9 +906,9 @@ case TYPE(CMSG_NETIF_BE, CMSG_NETIF_BE_CONNECT): P2C(netif_be_connect_t, domid, u32); P2C(netif_be_connect_t, netif_handle, u32); - P2C(netif_be_connect_t, tx_shmem_frame, memory_t); + P2C(netif_be_connect_t, tx_shmem_frame, unsigned long); P2C(netif_be_connect_t, tx_shmem_ref, u32); - P2C(netif_be_connect_t, rx_shmem_frame, memory_t); + P2C(netif_be_connect_t, rx_shmem_frame, unsigned long); P2C(netif_be_connect_t, rx_shmem_ref, u32); P2C(netif_be_connect_t, evtchn, u16); break; @@ -942,7 +942,7 @@ P2C(usbif_fe_driver_status_changed_t, status, u32); break; case TYPE(CMSG_USBIF_FE, CMSG_USBIF_FE_INTERFACE_CONNECT): - P2C(usbif_fe_interface_connect_t, shmem_frame, memory_t); + P2C(usbif_fe_interface_connect_t, shmem_frame, unsigned long); break; case TYPE(CMSG_USBIF_FE, CMSG_USBIF_FE_INTERFACE_DISCONNECT): break; @@ -956,7 +956,7 @@ break; case TYPE(CMSG_USBIF_BE, CMSG_USBIF_BE_CONNECT): P2C(usbif_be_connect_t, domid, domid_t); - P2C(usbif_be_connect_t, shmem_frame, memory_t); + P2C(usbif_be_connect_t, shmem_frame, unsigned long); P2C(usbif_be_connect_t, evtchn, u32); P2C(usbif_be_connect_t, bandwidth, u32); P2C(usbif_be_connect_t, status, u32); diff -r 74044b8186a9 -r 0608852073c8 tools/xentrace/xentrace.c --- a/tools/xentrace/xentrace.c Fri Aug 19 16:46:51 2005 +++ b/tools/xentrace/xentrace.c Fri Aug 19 17:25:04 2005 @@ -95,13 +95,13 @@ /** * get_tbufs - get pointer to and size of the trace buffers - * @mach_addr: location to store machine address if the trace buffers to - * @size: location to store the size of a trace buffer to + * @mfn: location to store mfn of the trace buffers to + * @size: location to store the size of a trace buffer to * * Gets the machine address of the trace pointer area and the size of the * per CPU buffers. */ -void get_tbufs(unsigned long *mach_addr, unsigned long *size) +void get_tbufs(unsigned long *mfn, unsigned long *size) { int ret; dom0_op_t op; /* dom0 op we'll build */ @@ -121,19 +121,19 @@ exit(EXIT_FAILURE); } - *mach_addr = op.u.tbufcontrol.mach_addr; - *size = op.u.tbufcontrol.size; + *mfn = op.u.tbufcontrol.buffer_mfn; + *size = op.u.tbufcontrol.size; } /** * map_tbufs - memory map Xen trace buffers into user space - * @tbufs: machine address of the trace buffers + * @tbufs_mfn: mfn of the trace buffers * @num: number of trace buffers to map * @size: size of each trace buffer * * Maps the Xen trace buffers them into process address space. */ -struct t_buf *map_tbufs(unsigned long tbufs_mach, unsigned int num, +struct t_buf *map_tbufs(unsigned long tbufs_mfn, unsigned int num, unsigned long size) { int xc_handle; /* file descriptor for /proc/xen/privcmd */ @@ -149,7 +149,7 @@ tbufs_mapped = xc_map_foreign_range(xc_handle, 0 /* Dom 0 ID */, size * num, PROT_READ, - tbufs_mach >> PAGE_SHIFT); + tbufs_mfn); xc_interface_close(xc_handle); @@ -231,7 +231,7 @@ /** * init_rec_ptrs - initialises data area pointers to locations in user space - * @tbufs_mach: machine base address of the trace buffer area + * @tbufs_mfn: base mfn of the trace buffer area * @tbufs_mapped: user virtual address of base of trace buffer area * @meta: array of user-space pointers to struct t_buf's of metadata * @num: number of trace buffers @@ -240,7 +240,7 @@ * mapped in user space. Note that the trace buffer metadata contains machine * pointers - the array returned allows more convenient access to them. */ -struct t_rec **init_rec_ptrs(unsigned long tbufs_mach, +struct t_rec **init_rec_ptrs(unsigned long tbufs_mfn, struct t_buf *tbufs_mapped, struct t_buf **meta, unsigned int num) @@ -256,7 +256,7 @@ } for ( i = 0; i < num; i++ ) - data[i] = (struct t_rec *)(meta[i]->rec_addr - tbufs_mach + data[i] = (struct t_rec *)(meta[i]->rec_addr - (tbufs_mfn<<XC_PAGE_SHIFT) /* XXX */ + (unsigned long)tbufs_mapped); return data; @@ -330,7 +330,7 @@ struct t_rec **data; /* pointers to the trace buffer data areas * where they are mapped into user space. */ unsigned long *cons; /* store tail indexes for the trace buffers */ - unsigned long tbufs_mach; /* machine address of the tbufs */ + unsigned long tbufs_mfn; /* mfn of the tbufs */ unsigned int num; /* number of trace buffers / logical CPUS */ unsigned long size; /* size of a single trace buffer */ @@ -340,14 +340,14 @@ num = get_num_cpus(); /* setup access to trace buffers */ - get_tbufs(&tbufs_mach, &size); - tbufs_mapped = map_tbufs(tbufs_mach, num, size); + get_tbufs(&tbufs_mfn, &size); + tbufs_mapped = map_tbufs(tbufs_mfn, num, size); size_in_recs = (size - sizeof(struct t_buf)) / sizeof(struct t_rec); /* build arrays of convenience ptrs */ meta = init_bufs_ptrs (tbufs_mapped, num, size); - data = init_rec_ptrs (tbufs_mach, tbufs_mapped, meta, num); + data = init_rec_ptrs (tbufs_mfn, tbufs_mapped, meta, num); cons = init_tail_idxs (meta, num); /* now, scan buffers for events */ diff -r 74044b8186a9 -r 0608852073c8 xen/arch/x86/physdev.c --- a/xen/arch/x86/physdev.c Fri Aug 19 16:46:51 2005 +++ b/xen/arch/x86/physdev.c Fri Aug 19 17:25:04 2005 @@ -106,7 +106,7 @@ (op.u.set_iobitmap.nr_ports > 65536) ) break; ret = 0; - current->arch.iobmp = (u8 *)op.u.set_iobitmap.bitmap; + current->arch.iobmp = op.u.set_iobitmap.bitmap; current->arch.iobmp_limit = op.u.set_iobitmap.nr_ports; break; default: diff -r 74044b8186a9 -r 0608852073c8 xen/common/trace.c --- a/xen/common/trace.c Fri Aug 19 16:46:51 2005 +++ b/xen/common/trace.c Fri Aug 19 17:25:04 2005 @@ -113,10 +113,10 @@ switch ( tbc->op) { case DOM0_TBUF_GET_INFO: - tbc->cpu_mask = tb_cpu_mask; - tbc->evt_mask = tb_event_mask; - tbc->mach_addr = __pa(t_bufs[0]); - tbc->size = opt_tbuf_size * PAGE_SIZE; + tbc->cpu_mask = tb_cpu_mask; + tbc->evt_mask = tb_event_mask; + tbc->buffer_mfn = __pa(t_bufs[0]) >> PAGE_SHIFT; + tbc->size = opt_tbuf_size * PAGE_SIZE; break; case DOM0_TBUF_SET_CPU_MASK: tb_cpu_mask = tbc->cpu_mask; diff -r 74044b8186a9 -r 0608852073c8 xen/include/public/arch-ia64.h --- a/xen/include/public/arch-ia64.h Fri Aug 19 16:46:51 2005 +++ b/xen/include/public/arch-ia64.h Fri Aug 19 17:25:04 2005 @@ -12,9 +12,6 @@ #define MAX_VIRT_CPUS 1 #ifndef __ASSEMBLY__ - -/* NB. Both the following are 64 bits each. */ -typedef unsigned long memory_t; /* Full-sized pointer/address/memory-size. */ #define MAX_NR_SECTION 32 // at most 32 memory holes typedef struct { diff -r 74044b8186a9 -r 0608852073c8 xen/include/public/arch-x86_32.h --- a/xen/include/public/arch-x86_32.h Fri Aug 19 16:46:51 2005 +++ b/xen/include/public/arch-x86_32.h Fri Aug 19 17:25:04 2005 @@ -63,9 +63,6 @@ #ifndef __ASSEMBLY__ -/* NB. Both the following are 32 bits each. */ -typedef unsigned long memory_t; /* Full-sized pointer/address/memory-size. */ - /* * Send an array of these to HYPERVISOR_set_trap_table() */ @@ -74,10 +71,10 @@ #define TI_SET_DPL(_ti,_dpl) ((_ti)->flags |= (_dpl)) #define TI_SET_IF(_ti,_if) ((_ti)->flags |= ((!!(_if))<<2)) typedef struct trap_info { - u8 vector; /* exception vector */ - u8 flags; /* 0-3: privilege level; 4: clear event enable? */ - u16 cs; /* code selector */ - memory_t address; /* code address */ + u8 vector; /* exception vector */ + u8 flags; /* 0-3: privilege level; 4: clear event enable? */ + u16 cs; /* code selector */ + unsigned long address; /* code offset */ } trap_info_t; typedef struct cpu_user_regs { diff -r 74044b8186a9 -r 0608852073c8 xen/include/public/arch-x86_64.h --- a/xen/include/public/arch-x86_64.h Fri Aug 19 16:46:51 2005 +++ b/xen/include/public/arch-x86_64.h Fri Aug 19 17:25:04 2005 @@ -103,9 +103,6 @@ /* Bottom of switch_to_user stack frame. */ }; -/* NB. Both the following are 64 bits each. */ -typedef unsigned long memory_t; /* Full-sized pointer/address/memory-size. */ - /* * Send an array of these to HYPERVISOR_set_trap_table(). * N.B. As in x86/32 mode, the privilege level specifies which modes may enter @@ -121,10 +118,10 @@ #define TI_SET_DPL(_ti,_dpl) ((_ti)->flags |= (_dpl)) #define TI_SET_IF(_ti,_if) ((_ti)->flags |= ((!!(_if))<<2)) typedef struct trap_info { - u8 vector; /* exception vector */ - u8 flags; /* 0-3: privilege level; 4: clear event enable? */ - u16 cs; /* code selector */ - memory_t address; /* code address */ + u8 vector; /* exception vector */ + u8 flags; /* 0-3: privilege level; 4: clear event enable? */ + u16 cs; /* code selector */ + unsigned long address; /* code offset */ } trap_info_t; typedef struct cpu_user_regs { diff -r 74044b8186a9 -r 0608852073c8 xen/include/public/dom0_ops.h --- a/xen/include/public/dom0_ops.h Fri Aug 19 16:46:51 2005 +++ b/xen/include/public/dom0_ops.h Fri Aug 19 17:25:04 2005 @@ -19,7 +19,7 @@ * This makes sure that old versions of dom0 tools will stop working in a * well-defined way (rather than crashing the machine, for instance). */ -#define DOM0_INTERFACE_VERSION 0xAAAA100E +#define DOM0_INTERFACE_VERSION 0xAAAA100F /************************************************************************/ @@ -27,10 +27,10 @@ typedef struct { /* IN variables. */ domid_t domain; - memory_t max_pfns; + unsigned long max_pfns; void *buffer; /* OUT variables. */ - memory_t num_pfns; + unsigned long num_pfns; } dom0_getmemlist_t; #define DOM0_SCHEDCTL 6 @@ -83,9 +83,9 @@ #define DOMFLAGS_SHUTDOWNMASK 255 /* DOMFLAGS_SHUTDOWN guest-supplied code. */ #define DOMFLAGS_SHUTDOWNSHIFT 16 u32 flags; - memory_t tot_pages; - memory_t max_pages; - memory_t shared_info_frame; /* MFN of shared_info struct */ + unsigned long tot_pages; + unsigned long max_pages; + unsigned long shared_info_frame; /* MFN of shared_info struct */ u64 cpu_time; u32 n_vcpu; s32 vcpu_to_cpu[MAX_VIRT_CPUS]; /* current mapping */ @@ -155,7 +155,7 @@ typedef struct { /* IN variables. */ - memory_t pfn; /* Machine page frame number to query. */ + unsigned long pfn; /* Machine page frame number to query. */ domid_t domain; /* To which domain does the frame belong? */ /* OUT variables. */ /* Is the page PINNED to a type? */ @@ -197,7 +197,7 @@ unsigned long cpu_mask; u32 evt_mask; /* OUT variables */ - memory_t mach_addr; + unsigned long buffer_mfn; u32 size; } dom0_tbufcontrol_t; @@ -211,8 +211,8 @@ u32 sockets_per_node; u32 nr_nodes; u32 cpu_khz; - memory_t total_pages; - memory_t free_pages; + unsigned long total_pages; + unsigned long free_pages; } dom0_physinfo_t; /* @@ -252,7 +252,7 @@ u32 op; unsigned long *dirty_bitmap; /* pointer to locked buffer */ /* IN/OUT variables. */ - memory_t pages; /* size of buffer, updated with actual size */ + unsigned long pages; /* size of buffer, updated with actual size */ /* OUT variables. */ dom0_shadow_control_stats_t stats; } dom0_shadow_control_t; @@ -260,15 +260,15 @@ #define DOM0_SETDOMAINMAXMEM 28 typedef struct { /* IN variables. */ - domid_t domain; - memory_t max_memkb; + domid_t domain; + unsigned long max_memkb; } dom0_setdomainmaxmem_t; #define DOM0_GETPAGEFRAMEINFO2 29 /* batched interface */ typedef struct { /* IN variables. */ - domid_t domain; - memory_t num; + domid_t domain; + unsigned long num; /* IN/OUT variables. */ unsigned long *array; } dom0_getpageframeinfo2_t; @@ -283,12 +283,12 @@ #define DOM0_ADD_MEMTYPE 31 typedef struct { /* IN variables. */ - memory_t pfn; - memory_t nr_pfns; - u32 type; - /* OUT variables. */ - u32 handle; - u32 reg; + unsigned long pfn; + unsigned long nr_pfns; + u32 type; + /* OUT variables. */ + u32 handle; + u32 reg; } dom0_add_memtype_t; /* @@ -311,8 +311,8 @@ /* IN variables. */ u32 reg; /* OUT variables. */ - memory_t pfn; - memory_t nr_pfns; + unsigned long pfn; + unsigned long nr_pfns; u32 type; } dom0_read_memtype_t; @@ -361,10 +361,10 @@ typedef struct { /* IN variables. */ domid_t first_domain; - memory_t max_domains; + unsigned int max_domains; dom0_getdomaininfo_t *buffer; /* OUT variables. */ - memory_t num_domains; + unsigned int num_domains; } dom0_getdomaininfolist_t; #define DOM0_PLATFORM_QUIRK 39 diff -r 74044b8186a9 -r 0608852073c8 xen/include/public/grant_table.h --- a/xen/include/public/grant_table.h Fri Aug 19 16:46:51 2005 +++ b/xen/include/public/grant_table.h Fri Aug 19 17:25:04 2005 @@ -153,13 +153,13 @@ #define GNTTABOP_map_grant_ref 0 typedef struct gnttab_map_grant_ref { /* IN parameters. */ - memory_t host_addr; + u64 host_addr; domid_t dom; grant_ref_t ref; u16 flags; /* GNTMAP_* */ /* OUT parameters. */ s16 handle; /* +ve: handle; -ve: GNTST_* */ - memory_t dev_bus_addr; + u64 dev_bus_addr; } gnttab_map_grant_ref_t; /* @@ -176,8 +176,8 @@ #define GNTTABOP_unmap_grant_ref 1 typedef struct gnttab_unmap_grant_ref { /* IN parameters. */ - memory_t host_addr; - memory_t dev_bus_addr; + u64 host_addr; + u64 dev_bus_addr; u16 handle; /* OUT parameters. */ s16 status; /* GNTST_* */ @@ -223,7 +223,7 @@ */ #define GNTTABOP_donate 4 typedef struct { - memory_t mfn; /* 0 */ + unsigned long mfn; /* 0 */ domid_t domid; /* 4 */ u16 handle; /* 8 */ s16 status; /* 10: GNTST_* */ diff -r 74044b8186a9 -r 0608852073c8 xen/include/public/io/domain_controller.h --- a/xen/include/public/io/domain_controller.h Fri Aug 19 16:46:51 2005 +++ b/xen/include/public/io/domain_controller.h Fri Aug 19 17:25:04 2005 @@ -139,7 +139,7 @@ */ typedef struct blkif_fe_interface_connect { u32 handle; - memory_t shmem_frame; + unsigned long shmem_frame; int shmem_ref; } blkif_fe_interface_connect_t; @@ -249,7 +249,7 @@ /* IN */ domid_t domid; /* Domain attached to new interface. */ u32 blkif_handle; /* Domain-specific interface handle. */ - memory_t shmem_frame; /* Page cont. shared comms window. */ + unsigned long shmem_frame;/* Page cont. shared comms window. */ int shmem_ref; /* Grant table reference. */ u32 evtchn; /* Event channel for notifications. */ /* OUT */ @@ -364,11 +364,11 @@ * STATUS_CONNECTED message. */ typedef struct netif_fe_interface_connect { - u32 handle; - memory_t tx_shmem_frame; - int tx_shmem_ref; - memory_t rx_shmem_frame; - int rx_shmem_ref; + u32 handle; + unsigned long tx_shmem_frame; + int tx_shmem_ref; + unsigned long rx_shmem_frame; + int rx_shmem_ref; } netif_fe_interface_connect_t; /* @@ -486,13 +486,13 @@ */ typedef struct netif_be_connect { /* IN */ - domid_t domid; /* Domain attached to new interface. */ - u32 netif_handle; /* Domain-specific interface handle. */ - memory_t tx_shmem_frame; /* Page cont. tx shared comms window. */ - int tx_shmem_ref; /* Grant reference for above */ - memory_t rx_shmem_frame; /* Page cont. rx shared comms window. */ - int rx_shmem_ref; /* Grant reference for above */ - u16 evtchn; /* Event channel for notifications. */ + domid_t domid; /* Domain attached to new interface. */ + u32 netif_handle; /* Domain-specific interface handle. */ + unsigned long tx_shmem_frame;/* Page cont. tx shared comms window. */ + int tx_shmem_ref; /* Grant reference for above */ + unsigned long rx_shmem_frame;/* Page cont. rx shared comms window. */ + int rx_shmem_ref; /* Grant reference for above */ + u16 evtchn; /* Event channel for notifications. */ /* OUT */ u32 status; } netif_be_connect_t; @@ -577,7 +577,7 @@ * STATUS_CONNECTED message. */ typedef struct usbif_fe_interface_connect { - memory_t shmem_frame; + unsigned long shmem_frame; } usbif_fe_interface_connect_t; /* @@ -660,7 +660,7 @@ typedef struct usbif_be_connect { /* IN */ domid_t domid; /* Domain attached to new interface. */ - memory_t shmem_frame; /* Page cont. shared comms window. */ + unsigned long shmem_frame;/* Page cont. shared comms window. */ u32 evtchn; /* Event channel for notifications. */ u32 bandwidth; /* Bandwidth allocated for isoch / int - us * per 1ms frame (ie between 0 and 900 or 800 @@ -780,7 +780,7 @@ #define PDB_CONNECTION_STATUS_UP 1 #define PDB_CONNECTION_STATUS_DOWN 2 u32 status; - memory_t ring; /* status: UP */ + unsigned long ring; /* status: UP */ u32 evtchn; /* status: UP */ } pdb_connection_t, *pdb_connection_p; diff -r 74044b8186a9 -r 0608852073c8 xen/include/public/io/netif.h --- a/xen/include/public/io/netif.h Fri Aug 19 16:46:51 2005 +++ b/xen/include/public/io/netif.h Fri Aug 19 17:25:04 2005 @@ -10,7 +10,7 @@ #define __XEN_PUBLIC_IO_NETIF_H__ typedef struct netif_tx_request { - memory_t addr; /* Machine address of packet. */ + unsigned long addr; /* Machine address of packet. */ u16 csum_blank:1; /* Proto csum field blank? */ u16 id:15; /* Echoed in response message. */ u16 size; /* Packet size in bytes. */ @@ -32,7 +32,7 @@ #ifdef CONFIG_XEN_NETDEV_GRANT_TX u32 addr; /* 0: Offset in page of start of received packet */ #else - memory_t addr; /* Machine address of packet. */ + unsigned long addr; /* Machine address of packet. */ #endif u16 csum_valid:1; /* Protocol checksum is validated? */ u16 id:15; diff -r 74044b8186a9 -r 0608852073c8 xen/include/public/physdev.h --- a/xen/include/public/physdev.h Fri Aug 19 16:46:51 2005 +++ b/xen/include/public/physdev.h Fri Aug 19 17:25:04 2005 @@ -27,8 +27,8 @@ typedef struct physdevop_set_iobitmap { /* IN */ - memory_t bitmap; - u32 nr_ports; + char *bitmap; + u32 nr_ports; } physdevop_set_iobitmap_t; typedef struct physdevop_apic { diff -r 74044b8186a9 -r 0608852073c8 xen/include/public/xen.h --- a/xen/include/public/xen.h Fri Aug 19 16:46:51 2005 +++ b/xen/include/public/xen.h Fri Aug 19 17:25:04 2005 @@ -171,9 +171,9 @@ unsigned int cmd; union { /* [UN]PIN_TABLE, NEW_BASEPTR, NEW_USER_BASEPTR, REASSIGN_PAGE */ - memory_t mfn; + unsigned long mfn; /* INVLPG_LOCAL, INVLPG_ALL, SET_LDT */ - memory_t linear_addr; + unsigned long linear_addr; }; union { /* SET_LDT */ @@ -438,18 +438,18 @@ #define MAX_GUEST_CMDLINE 1024 typedef struct start_info { /* THE FOLLOWING ARE FILLED IN BOTH ON INITIAL BOOT AND ON RESUME. */ - memory_t nr_pages; /* Total pages allocated to this domain. */ - memory_t shared_info; /* MACHINE address of shared info struct. */ + unsigned long nr_pages; /* Total pages allocated to this domain. */ + unsigned long shared_info;/* MACHINE address of shared info struct. */ u32 flags; /* SIF_xxx flags. */ u16 domain_controller_evtchn; /* THE FOLLOWING ARE ONLY FILLED IN ON INITIAL BOOT (NOT RESUME). */ - memory_t pt_base; /* VIRTUAL address of page directory. */ - memory_t nr_pt_frames; /* Number of bootstrap p.t. frames. */ - memory_t mfn_list; /* VIRTUAL address of page-frame list. */ - memory_t mod_start; /* VIRTUAL address of pre-loaded module. */ - memory_t mod_len; /* Size (bytes) of pre-loaded module. */ + unsigned long pt_base; /* VIRTUAL address of page directory. */ + unsigned long nr_pt_frames;/* Number of bootstrap p.t. frames. */ + unsigned long mfn_list; /* VIRTUAL address of page-frame list. */ + unsigned long mod_start; /* VIRTUAL address of pre-loaded module. */ + unsigned long mod_len; /* Size (bytes) of pre-loaded module. */ s8 cmd_line[MAX_GUEST_CMDLINE]; - memory_t store_mfn; /* MACHINE page number of shared page. */ + unsigned long store_mfn; /* MACHINE page number of shared page. */ u16 store_evtchn; /* Event channel for store communication. */ } start_info_t; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |