===== tools/libxc/xc.h 1.88 vs edited ===== --- 1.88/tools/libxc/xc.h Thu Jun 9 08:32:26 2005 +++ edited/tools/libxc/xc.h Mon Jun 13 13:54:41 2005 @@ -26,6 +26,14 @@ #include #include +#ifdef __ia64__ +#define XC_PAGE_SHIFT 14 +#else +#define XC_PAGE_SHIFT 12 +#endif +#define XC_PAGE_SIZE (1UL << XC_PAGE_SHIFT) +#define XC_PAGE_MASK (~(XC_PAGE_SIZE-1)) + /* * DEFINITIONS FOR CPU BARRIERS */ ===== tools/libxc/xc_domain.c 1.64 vs edited ===== --- 1.64/tools/libxc/xc_domain.c Wed Jun 1 08:44:06 2005 +++ edited/tools/libxc/xc_domain.c Tue Jun 14 13:47:20 2005 @@ -236,10 +236,11 @@ unsigned int mem_kb) { int err; + unsigned int npages = mem_kb / (PAGE_SIZE/1024); err = do_dom_mem_op(xc_handle, MEMOP_increase_reservation, NULL, - mem_kb / 4, 0, domid); - if (err == mem_kb / 4) + npages, 0, domid); + if (err == npages) return 0; if (err > 0) { ===== tools/libxc/xc_private.h 1.52 vs edited ===== --- 1.52/tools/libxc/xc_private.h Mon Jun 6 02:43:55 2005 +++ edited/tools/libxc/xc_private.h Mon Jun 13 13:54:41 2005 @@ -49,7 +49,7 @@ #define L4_PAGETABLE_ENTRIES 512 #endif -#define PAGE_SHIFT L1_PAGETABLE_SHIFT +#define PAGE_SHIFT XC_PAGE_SHIFT #define PAGE_SIZE (1UL << PAGE_SHIFT) #define PAGE_MASK (~(PAGE_SIZE-1)) ===== tools/python/xen/lowlevel/xc/xc.c 1.92 vs edited ===== --- 1.92/tools/python/xen/lowlevel/xc/xc.c Thu Jun 9 08:32:26 2005 +++ edited/tools/python/xen/lowlevel/xc/xc.c Mon Jun 13 13:54:41 2005 @@ -239,7 +239,7 @@ "paused", info[i].paused, "blocked", info[i].blocked, "running", info[i].running, - "mem_kb", info[i].nr_pages*4, + "mem_kb", info[i].nr_pages*(XC_PAGE_SIZE/1024), "cpu_time", info[i].cpu_time, "maxmem_kb", info[i].max_memkb, "shutdown_reason", info[i].shutdown_reason); ===== tools/python/xen/lowlevel/xu/xu.c 1.36 vs edited ===== --- 1.36/tools/python/xen/lowlevel/xu/xu.c Thu Jun 9 19:58:25 2005 +++ edited/tools/python/xen/lowlevel/xu/xu.c Mon Jun 13 13:54:41 2005 @@ -46,9 +46,6 @@ /* EVTCHN_UNBIND: Unbind from the specified event-channel port. */ #define EVTCHN_UNBIND _IO('E', 3) -/* Size of a machine page frame. */ -#define PAGE_SIZE 4096 - /* Set the close-on-exec flag on a file descriptor. Doesn't currently bother * to check for errors. */ /* ===== tools/python/xen/xend/XendCheckpoint.py 1.6 vs edited ===== --- 1.6/tools/python/xen/xend/XendCheckpoint.py Mon Jun 6 04:03:23 2005 +++ edited/tools/python/xen/xend/XendCheckpoint.py Mon Jun 13 13:54:41 2005 @@ -17,7 +17,6 @@ from XendLogging import log SIGNATURE = "LinuxGuestRecord" -PAGE_SIZE = 4096 PATH_XC_SAVE = "/usr/libexec/xen/xc_save" PATH_XC_RESTORE = "/usr/libexec/xen/xc_restore" ===== tools/xcs/xcs.h 1.2 vs edited ===== --- 1.2/tools/xcs/xcs.h Tue Mar 1 15:48:53 2005 +++ edited/tools/xcs/xcs.h Tue Jun 14 13:47:50 2005 @@ -37,7 +37,7 @@ /* ------[ Other required defines ]----------------------------------------*/ /* Size of a machine page frame. */ -#define PAGE_SIZE 4096 +#define PAGE_SIZE XC_PAGE_SIZE #ifndef timersub /* XOPEN and __BSD don't cooperate well... */ #define timersub(a, b, result) \