WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Local merge of two headed repo.

# HG changeset patch
# User sd386@xxxxxxxxxxxxxxxxx
# Node ID eb9df2c3a478813d5278bc1e08925ad239257e0d
# Parent  42f0160093ff4aa587fdef9ab5fa899e25b58b06
# Parent  5e8123554d158af331c65dfd5a93981f54b54196
Local merge of two headed repo.

diff -r 42f0160093ff -r eb9df2c3a478 
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 
18:08:29 2005
+++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/ioport.c        Fri Aug 19 
18:12:48 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 42f0160093ff -r eb9df2c3a478 
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 
18:08:29 2005
+++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/process.c       Fri Aug 19 
18:12:48 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 42f0160093ff -r eb9df2c3a478 
linux-2.6-xen-sparse/arch/xen/i386/kernel/swiotlb.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/swiotlb.c       Fri Aug 19 
18:08:29 2005
+++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/swiotlb.c       Fri Aug 19 
18:12:48 2005
@@ -43,20 +43,18 @@
 #define IO_TLB_SHIFT 11
 
 int swiotlb_force;
+static char *iotlb_virt_start;
+static unsigned long iotlb_nslabs;
 
 /*
  * Used to do a quick range check in swiotlb_unmap_single and
  * swiotlb_sync_single_*, to see if the memory was in fact allocated by this
  * API.
  */
-static char *iotlb_virt_start, *iotlb_virt_end;
-static dma_addr_t iotlb_bus_start, iotlb_bus_end;
-
-/*
- * The number of IO TLB blocks (in groups of 64) betweeen iotlb_virt_start and
- * iotlb_virt_end.  This is command line adjustable via setup_io_tlb_npages.
- */
-static unsigned long iotlb_nslabs;
+static dma_addr_t iotlb_bus_start, iotlb_bus_mask;
+
+/* Does the given dma address reside within the swiotlb aperture? */
+#define in_swiotlb_aperture(a) (!(((a) ^ iotlb_bus_start) & iotlb_bus_mask))
 
 /*
  * When the IOMMU overflows we return a fallback buffer. This sets the size.
@@ -94,6 +92,9 @@
                iotlb_nslabs = simple_strtoul(str, &str, 0) <<
                        (20 - IO_TLB_SHIFT);
                iotlb_nslabs = ALIGN(iotlb_nslabs, IO_TLB_SEGSIZE);
+               /* Round up to power of two (xen_create_contiguous_region). */
+               while (iotlb_nslabs & (iotlb_nslabs-1))
+                       iotlb_nslabs += iotlb_nslabs & ~(iotlb_nslabs-1);
        }
        if (*str == ',')
                ++str;
@@ -120,6 +121,9 @@
        if (!iotlb_nslabs) {
                iotlb_nslabs = (default_size >> IO_TLB_SHIFT);
                iotlb_nslabs = ALIGN(iotlb_nslabs, IO_TLB_SEGSIZE);
+               /* Round up to power of two (xen_create_contiguous_region). */
+               while (iotlb_nslabs & (iotlb_nslabs-1))
+                       iotlb_nslabs += iotlb_nslabs & ~(iotlb_nslabs-1);
        }
 
        bytes = iotlb_nslabs * (1UL << IO_TLB_SHIFT);
@@ -133,17 +137,12 @@
                      "Use dom0_mem Xen boot parameter to reserve\n"
                      "some DMA memory (e.g., dom0_mem=-128M).\n");
 
-       for (i = 0; i < iotlb_nslabs; i += IO_TLB_SEGSIZE)
-               xen_create_contiguous_region(
-                       (unsigned long)iotlb_virt_start + (i << IO_TLB_SHIFT),
-                       get_order(IO_TLB_SEGSIZE << IO_TLB_SHIFT));
-
-       iotlb_virt_end = iotlb_virt_start + bytes;
+       xen_create_contiguous_region(
+               (unsigned long)iotlb_virt_start, get_order(bytes));
 
        /*
         * Allocate and initialize the free list array.  This array is used
-        * to find contiguous free memory regions of size up to IO_TLB_SEGSIZE
-        * between iotlb_virt_start and iotlb_virt_end.
+        * to find contiguous free memory regions of size up to IO_TLB_SEGSIZE.
         */
        io_tlb_list = alloc_bootmem(iotlb_nslabs * sizeof(int));
        for (i = 0; i < iotlb_nslabs; i++)
@@ -156,15 +155,19 @@
         * Get the overflow emergency buffer
         */
        io_tlb_overflow_buffer = alloc_bootmem_low(io_tlb_overflow);
+
        iotlb_bus_start = virt_to_bus(iotlb_virt_start);
-       iotlb_bus_end   = iotlb_bus_start + bytes;
+       iotlb_bus_mask  = ~(dma_addr_t)(bytes - 1);
+
        printk(KERN_INFO "Software IO TLB enabled: \n"
               " Aperture:     %lu megabytes\n"
               " Bus range:    0x%016lx - 0x%016lx\n"
               " Kernel range: 0x%016lx - 0x%016lx\n",
               bytes >> 20,
-              (unsigned long)iotlb_bus_start, (unsigned long)iotlb_bus_end,
-              (unsigned long)iotlb_virt_start, (unsigned long)iotlb_virt_end);
+              (unsigned long)iotlb_bus_start,
+              (unsigned long)iotlb_bus_start + bytes,
+              (unsigned long)iotlb_virt_start,
+              (unsigned long)iotlb_virt_start + bytes);
 }
 
 void
@@ -444,7 +447,7 @@
                     int dir)
 {
        BUG_ON(dir == DMA_NONE);
-       if ((dev_addr >= iotlb_bus_start) && (dev_addr < iotlb_bus_end))
+       if (in_swiotlb_aperture(dev_addr))
                unmap_single(hwdev, bus_to_virt(dev_addr), size, dir);
 }
 
@@ -463,7 +466,7 @@
                            size_t size, int dir)
 {
        BUG_ON(dir == DMA_NONE);
-       if ((dev_addr >= iotlb_bus_start) && (dev_addr < iotlb_bus_end))
+       if (in_swiotlb_aperture(dev_addr))
                sync_single(hwdev, bus_to_virt(dev_addr), size, dir);
 }
 
@@ -472,7 +475,7 @@
                               size_t size, int dir)
 {
        BUG_ON(dir == DMA_NONE);
-       if ((dev_addr >= iotlb_bus_start) && (dev_addr < iotlb_bus_end))
+       if (in_swiotlb_aperture(dev_addr))
                sync_single(hwdev, bus_to_virt(dev_addr), size, dir);
 }
 
@@ -610,7 +613,7 @@
                   size_t size, enum dma_data_direction direction)
 {
        BUG_ON(direction == DMA_NONE);
-       if ((dma_address >= iotlb_bus_start) && (dma_address < iotlb_bus_end))
+       if (in_swiotlb_aperture(dma_address))
                unmap_single(hwdev, bus_to_virt(dma_address), size, direction);
 }
 
diff -r 42f0160093ff -r eb9df2c3a478 
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 
18:08:29 2005
+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/process.c     Fri Aug 19 
18:12:48 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 42f0160093ff -r eb9df2c3a478 
linux-2.6-xen-sparse/drivers/xen/blkback/common.h
--- a/linux-2.6-xen-sparse/drivers/xen/blkback/common.h Fri Aug 19 18:08:29 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/blkback/common.h Fri Aug 19 18:12:48 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 42f0160093ff -r eb9df2c3a478 
linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c Fri Aug 19 18:08:29 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c Fri Aug 19 18:12:48 2005
@@ -182,14 +182,18 @@
                            "frontend-id", "%li", &be->frontend_id,
                            "frontend", NULL, &frontend,
                            NULL);
-       if (err == -ENOENT || err == -ERANGE ||
+       if (XENBUS_EXIST_ERR(err) ||
            strlen(frontend) == 0 || !xenbus_exists(frontend, "")) {
-               if (frontend)
-                       kfree(frontend);
                /* If we can't get a frontend path and a frontend-id,
                 * then our bus-id is no longer valid and we need to
                 * destroy the backend device.
                 */
+               goto device_fail;
+       }
+       if (err < 0) {
+               xenbus_dev_error(dev, err,
+                                "reading %s/frontend or frontend-id",
+                                dev->nodename);
                goto device_fail;
        }
 
@@ -199,6 +203,7 @@
                if (be->frontpath)
                        kfree(be->frontpath);
                be->frontpath = frontend;
+               frontend = NULL;
                be->watch.node = be->frontpath;
                be->watch.callback = frontend_changed;
                err = register_xenbus_watch(&be->watch);
@@ -206,14 +211,13 @@
                        be->watch.node = NULL;
                        goto device_fail;
                }
-       } else
-               kfree(frontend);
+       }
 
        err = xenbus_scanf(dev->nodename, "physical-device", "%li", &pdev);
-       if (err == -ENOENT || err == -ERANGE)
+       if (XENBUS_EXIST_ERR(err))
                goto out;
        if (err < 0) {
-               xenbus_dev_error(dev, err, "Reading physical-device");
+               xenbus_dev_error(dev, err, "reading physical-device");
                goto device_fail;
        }
        if (be->pdev && be->pdev != pdev) {
@@ -253,12 +257,14 @@
                frontend_changed(&be->watch, be->frontpath);
        }
 
+ out:
+       if (frontend)
+               kfree(frontend);
        return;
 
  device_fail:
        device_unregister(&be->dev->dev);
- out:
-       return;
+       goto out;
 }
 
 static int blkback_probe(struct xenbus_device *dev,
diff -r 42f0160093ff -r eb9df2c3a478 
linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c      Fri Aug 19 
18:08:29 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c      Fri Aug 19 
18:12:48 2005
@@ -1134,25 +1134,24 @@
                            "info", "%u", &binfo,
                            "sector-size", "%lu", &sector_size,
                            NULL);
-
-       if (err)
+       if (err) {
                xenbus_dev_error(info->dev, err, "reading backend fields");
-       else {
-               xlvbd_add(sectors, info->vdevice, info->handle, binfo,
-                         sector_size);
-               info->connected = 1;
-
-               /* First to connect?  blkif is now connected. */
-               if (blkif_vbds_connected++ == 0)
-                       blkif_state = BLKIF_STATE_CONNECTED;
-
-               xenbus_dev_ok(info->dev);
-
-               /* Kick pending requests. */
-               spin_lock_irq(&blkif_io_lock);
-               kick_pending_request_queues();
-               spin_unlock_irq(&blkif_io_lock);
-       }
+               return;
+       }
+
+       xlvbd_add(sectors, info->vdevice, info->handle, binfo, sector_size);
+       info->connected = 1;
+
+       /* First to connect?  blkif is now connected. */
+       if (blkif_vbds_connected++ == 0)
+               blkif_state = BLKIF_STATE_CONNECTED;
+
+       xenbus_dev_ok(info->dev);
+
+       /* Kick pending requests. */
+       spin_lock_irq(&blkif_io_lock);
+       kick_pending_request_queues();
+       spin_unlock_irq(&blkif_io_lock);
 }
 
 static int setup_blkring(struct xenbus_device *dev, unsigned int backend_id)
@@ -1199,36 +1198,28 @@
        const char *message;
        int err, backend_id;
 
-       backend = xenbus_read(dev->nodename, "backend", NULL);
-       if (IS_ERR(backend)) {
-               err = PTR_ERR(backend);
-               if (err == -ENOENT)
-                       goto out;
-               xenbus_dev_error(dev, err, "reading %s/backend",
+       backend = NULL;
+       err = xenbus_gather(dev->nodename,
+                           "backend-id", "%i", &backend_id,
+                           "backend", NULL, &backend,
+                           NULL);
+       if (XENBUS_EXIST_ERR(err))
+               goto out;
+       if (backend && strlen(backend) == 0) {
+               err = -ENOENT;
+               goto out;
+       }
+       if (err < 0) {
+               xenbus_dev_error(dev, err, "reading %s/backend or backend-id",
                                 dev->nodename);
                goto out;
        }
-       if (strlen(backend) == 0) {
-               err = -ENOENT;
-               goto free_backend;
-       }
-
-       /* FIXME: This driver can't handle backends on different
-        * domains.  Check and fail gracefully. */
-       err = xenbus_scanf(dev->nodename, "backend-id", "%i", &backend_id);
-       if (err == -ENOENT)
-               goto free_backend;
-       if (err < 0) {
-               xenbus_dev_error(dev, err, "reading %s/backend-id",
-                                dev->nodename);
-               goto free_backend;
-       }
 
        /* First device?  We create shared ring, alloc event channel. */
        if (blkif_vbds == 0) {
                err = setup_blkring(dev, backend_id);
                if (err)
-                       goto free_backend;
+                       goto out;
        }
 
        err = xenbus_transaction_start(dev->nodename);
@@ -1258,9 +1249,11 @@
                goto abort_transaction;
        }
 
-       info->watch.node = info->backend = backend;
+       info->backend = backend;
+       backend = NULL;
+
+       info->watch.node = info->backend;
        info->watch.callback = watch_for_status;
-
        err = register_xenbus_watch(&info->watch);
        if (err) {
                message = "registering watch on backend";
@@ -1272,20 +1265,20 @@
                xenbus_dev_error(dev, err, "completing transaction");
                goto destroy_blkring;
        }
-       return 0;
-
-abort_transaction:
+
+ out:
+       if (backend)
+               kfree(backend);
+       return err;
+
+ abort_transaction:
        xenbus_transaction_end(1);
        /* Have to do this *outside* transaction.  */
        xenbus_dev_error(dev, err, "%s", message);
-destroy_blkring:
+ destroy_blkring:
        if (blkif_vbds == 0)
                blkif_free();
-free_backend:
-       kfree(backend);
-out:
-       printk("%s:%u = %i\n", __FILE__, __LINE__, err);
-       return err;
+       goto out;
 }
 
 /* Setup supplies the backend dir, virtual device.
@@ -1301,7 +1294,7 @@
 
        /* FIXME: Use dynamic device id if this is not set. */
        err = xenbus_scanf(dev->nodename, "virtual-device", "%i", &vdevice);
-       if (err == -ENOENT)
+       if (XENBUS_EXIST_ERR(err))
                return err;
        if (err < 0) {
                xenbus_dev_error(dev, err, "reading virtual-device");
@@ -1316,6 +1309,7 @@
        info->dev = dev;
        info->vdevice = vdevice;
        info->connected = 0;
+
        /* Front end dir is a number, which is used as the id. */
        info->handle = simple_strtoul(strrchr(dev->nodename,'/')+1, NULL, 0);
        dev->data = info;
@@ -1427,8 +1421,8 @@
 
 #ifdef CONFIG_XEN_BLKDEV_GRANT
     /* A grant for every ring slot, plus one for the ring itself. */
-    if ( 0 > gnttab_alloc_grant_references(MAXIMUM_OUTSTANDING_BLOCK_REQS + 1,
-                                           &gref_head, &gref_terminal) )
+    if (gnttab_alloc_grant_references(MAXIMUM_OUTSTANDING_BLOCK_REQS + 1,
+                                     &gref_head, &gref_terminal) < 0)
         return 1;
     printk(KERN_ALERT "Blkif frontend is using grant tables.\n");
 #endif
diff -r 42f0160093ff -r eb9df2c3a478 
linux-2.6-xen-sparse/drivers/xen/blktap/blktap.h
--- a/linux-2.6-xen-sparse/drivers/xen/blktap/blktap.h  Fri Aug 19 18:08:29 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/blktap/blktap.h  Fri Aug 19 18:12:48 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 42f0160093ff -r eb9df2c3a478 
linux-2.6-xen-sparse/drivers/xen/netback/common.h
--- a/linux-2.6-xen-sparse/drivers/xen/netback/common.h Fri Aug 19 18:08:29 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/netback/common.h Fri Aug 19 18:12:48 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 42f0160093ff -r eb9df2c3a478 
linux-2.6-xen-sparse/drivers/xen/netback/netback.c
--- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c        Fri Aug 19 
18:08:29 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c        Fri Aug 19 
18:12:48 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 42f0160093ff -r eb9df2c3a478 
linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h
--- a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h       Fri Aug 
19 18:08:29 2005
+++ b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h       Fri Aug 
19 18:12:48 2005
@@ -507,14 +507,14 @@
     int vcpu, vcpu_guest_context_t *ctxt)
 {
     int ret;
-    unsigned long ign1, ign2;
-    __asm__ __volatile__ (
-        TRAP_INSTR
-        : "=a" (ret), "=b" (ign1), "=c" (ign2)
-       : "0" (__HYPERVISOR_sched_op),
-         "1" (SCHEDOP_vcpu_pickle | (vcpu << SCHEDOP_vcpushift)),
-         "2" (ctxt)
-        : __syscall_clobber );
+
+    __asm__ __volatile__ (
+        TRAP_INSTR
+        : "=a" (ret)
+       : "0" ((unsigned long)__HYPERVISOR_sched_op),
+       "D" ((unsigned long)SCHEDOP_vcpu_pickle | (vcpu << SCHEDOP_vcpushift)),
+       "S" ((unsigned long)ctxt)
+       : __syscall_clobber );
 
     return ret;
 }
diff -r 42f0160093ff -r eb9df2c3a478 
linux-2.6-xen-sparse/include/asm-xen/xenbus.h
--- a/linux-2.6-xen-sparse/include/asm-xen/xenbus.h     Fri Aug 19 18:08:29 2005
+++ b/linux-2.6-xen-sparse/include/asm-xen/xenbus.h     Fri Aug 19 18:12:48 2005
@@ -128,4 +128,14 @@
 void xenbus_suspend(void);
 void xenbus_resume(void);
 
+#define XENBUS_IS_ERR_READ(str) ({                     \
+       if (!IS_ERR(str) && strlen(str) == 0) {         \
+               kfree(str);                             \
+               str = ERR_PTR(-ERANGE);                 \
+       }                                               \
+       IS_ERR(str);                                    \
+})
+
+#define XENBUS_EXIST_ERR(err) ((err) == -ENOENT || (err) == -ERANGE)
+
 #endif /* _ASM_XEN_XENBUS_H */
diff -r 42f0160093ff -r eb9df2c3a478 tools/debugger/libxendebug/xendebug.c
--- a/tools/debugger/libxendebug/xendebug.c     Fri Aug 19 18:08:29 2005
+++ b/tools/debugger/libxendebug/xendebug.c     Fri Aug 19 18:12:48 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 42f0160093ff -r eb9df2c3a478 tools/debugger/libxendebug/xendebug.h
--- a/tools/debugger/libxendebug/xendebug.h     Fri Aug 19 18:08:29 2005
+++ b/tools/debugger/libxendebug/xendebug.h     Fri Aug 19 18:12:48 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 42f0160093ff -r eb9df2c3a478 tools/debugger/pdb/linux-2.6-module/debug.c
--- a/tools/debugger/pdb/linux-2.6-module/debug.c       Fri Aug 19 18:08:29 2005
+++ b/tools/debugger/pdb/linux-2.6-module/debug.c       Fri Aug 19 18:12:48 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 42f0160093ff -r eb9df2c3a478 
tools/debugger/pdb/linux-2.6-module/module.c
--- a/tools/debugger/pdb/linux-2.6-module/module.c      Fri Aug 19 18:08:29 2005
+++ b/tools/debugger/pdb/linux-2.6-module/module.c      Fri Aug 19 18:12:48 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 42f0160093ff -r eb9df2c3a478 
tools/debugger/pdb/linux-2.6-module/pdb_debug.h
--- a/tools/debugger/pdb/linux-2.6-module/pdb_debug.h   Fri Aug 19 18:08:29 2005
+++ b/tools/debugger/pdb/linux-2.6-module/pdb_debug.h   Fri Aug 19 18:12:48 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 42f0160093ff -r eb9df2c3a478 tools/debugger/pdb/pdb_caml_domain.c
--- a/tools/debugger/pdb/pdb_caml_domain.c      Fri Aug 19 18:08:29 2005
+++ b/tools/debugger/pdb/pdb_caml_domain.c      Fri Aug 19 18:12:48 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 42f0160093ff -r eb9df2c3a478 tools/debugger/pdb/pdb_caml_process.c
--- a/tools/debugger/pdb/pdb_caml_process.c     Fri Aug 19 18:08:29 2005
+++ b/tools/debugger/pdb/pdb_caml_process.c     Fri Aug 19 18:12:48 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 42f0160093ff -r eb9df2c3a478 tools/debugger/pdb/pdb_caml_xcs.c
--- a/tools/debugger/pdb/pdb_caml_xcs.c Fri Aug 19 18:08:29 2005
+++ b/tools/debugger/pdb/pdb_caml_xcs.c Fri Aug 19 18:12:48 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 42f0160093ff -r eb9df2c3a478 tools/libxc/xc.h
--- a/tools/libxc/xc.h  Fri Aug 19 18:08:29 2005
+++ b/tools/libxc/xc.h  Fri Aug 19 18:12:48 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 42f0160093ff -r eb9df2c3a478 tools/libxc/xc_gnttab.c
--- a/tools/libxc/xc_gnttab.c   Fri Aug 19 18:08:29 2005
+++ b/tools/libxc/xc_gnttab.c   Fri Aug 19 18:12:48 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 42f0160093ff -r eb9df2c3a478 tools/python/xen/lowlevel/xu/xu.c
--- a/tools/python/xen/lowlevel/xu/xu.c Fri Aug 19 18:08:29 2005
+++ b/tools/python/xen/lowlevel/xu/xu.c Fri Aug 19 18:12:48 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 42f0160093ff -r eb9df2c3a478 tools/xentrace/xentrace.c
--- a/tools/xentrace/xentrace.c Fri Aug 19 18:08:29 2005
+++ b/tools/xentrace/xentrace.c Fri Aug 19 18:12:48 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 42f0160093ff -r eb9df2c3a478 xen/arch/x86/physdev.c
--- a/xen/arch/x86/physdev.c    Fri Aug 19 18:08:29 2005
+++ b/xen/arch/x86/physdev.c    Fri Aug 19 18:12:48 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 42f0160093ff -r eb9df2c3a478 xen/common/trace.c
--- a/xen/common/trace.c        Fri Aug 19 18:08:29 2005
+++ b/xen/common/trace.c        Fri Aug 19 18:12:48 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 42f0160093ff -r eb9df2c3a478 xen/include/public/arch-ia64.h
--- a/xen/include/public/arch-ia64.h    Fri Aug 19 18:08:29 2005
+++ b/xen/include/public/arch-ia64.h    Fri Aug 19 18:12:48 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 42f0160093ff -r eb9df2c3a478 xen/include/public/arch-x86_32.h
--- a/xen/include/public/arch-x86_32.h  Fri Aug 19 18:08:29 2005
+++ b/xen/include/public/arch-x86_32.h  Fri Aug 19 18:12:48 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 42f0160093ff -r eb9df2c3a478 xen/include/public/arch-x86_64.h
--- a/xen/include/public/arch-x86_64.h  Fri Aug 19 18:08:29 2005
+++ b/xen/include/public/arch-x86_64.h  Fri Aug 19 18:12:48 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 42f0160093ff -r eb9df2c3a478 xen/include/public/dom0_ops.h
--- a/xen/include/public/dom0_ops.h     Fri Aug 19 18:08:29 2005
+++ b/xen/include/public/dom0_ops.h     Fri Aug 19 18:12:48 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 42f0160093ff -r eb9df2c3a478 xen/include/public/grant_table.h
--- a/xen/include/public/grant_table.h  Fri Aug 19 18:08:29 2005
+++ b/xen/include/public/grant_table.h  Fri Aug 19 18:12:48 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 42f0160093ff -r eb9df2c3a478 xen/include/public/io/domain_controller.h
--- a/xen/include/public/io/domain_controller.h Fri Aug 19 18:08:29 2005
+++ b/xen/include/public/io/domain_controller.h Fri Aug 19 18:12:48 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 42f0160093ff -r eb9df2c3a478 xen/include/public/io/netif.h
--- a/xen/include/public/io/netif.h     Fri Aug 19 18:08:29 2005
+++ b/xen/include/public/io/netif.h     Fri Aug 19 18:12:48 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 42f0160093ff -r eb9df2c3a478 xen/include/public/physdev.h
--- a/xen/include/public/physdev.h      Fri Aug 19 18:08:29 2005
+++ b/xen/include/public/physdev.h      Fri Aug 19 18:12:48 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 42f0160093ff -r eb9df2c3a478 xen/include/public/xen.h
--- a/xen/include/public/xen.h  Fri Aug 19 18:08:29 2005
+++ b/xen/include/public/xen.h  Fri Aug 19 18:12:48 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Local merge of two headed repo., Xen patchbot -unstable <=