[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 08 of 18] libxc: add xc_domain_maximum_gpfn to wrap XENMEM_maximum_gpfn



# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1286892402 -3600
# Node ID 9c4485d27ea16109765386fc582e00156bf7676a
# Parent  901ec3e53b42d599fe8d8e148797cfc729774702
libxc: add xc_domain_maximum_gpfn to wrap XENMEM_maximum_gpfn

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r 901ec3e53b42 -r 9c4485d27ea1 tools/libxc/ia64/xc_ia64_linux_save.c
--- a/tools/libxc/ia64/xc_ia64_linux_save.c     Tue Oct 12 15:06:42 2010 +0100
+++ b/tools/libxc/ia64/xc_ia64_linux_save.c     Tue Oct 12 15:06:42 2010 +0100
@@ -487,7 +487,7 @@ xc_domain_save(xc_interface *xch, int io
         goto out;
     }
 
-    p2m_size = xc_memory_op(xch, XENMEM_maximum_gpfn, &dom) + 1;
+    p2m_size = xc_domain_maximum_gpfn(xch, dom) + 1;
 
     /* This is expected by xm restore.  */
     if (write_exact(io_fd, &p2m_size, sizeof(unsigned long))) {
diff -r 901ec3e53b42 -r 9c4485d27ea1 tools/libxc/ia64/xc_ia64_stubs.c
--- a/tools/libxc/ia64/xc_ia64_stubs.c  Tue Oct 12 15:06:42 2010 +0100
+++ b/tools/libxc/ia64/xc_ia64_stubs.c  Tue Oct 12 15:06:42 2010 +0100
@@ -114,7 +114,7 @@ xc_ia64_copy_memmap(xc_interface *xch, u
 
     int ret;
 
-    gpfn_max_prev = xc_memory_op(xch, XENMEM_maximum_gpfn, &domid);
+    gpfn_max_prev = xc_domain_maximum_gpfn(xch, domid);
     if (gpfn_max_prev < 0)
         return -1;
 
@@ -143,7 +143,7 @@ xc_ia64_copy_memmap(xc_interface *xch, u
         goto again;
     }
 
-    gpfn_max_post = xc_memory_op(xch, XENMEM_maximum_gpfn, &domid);
+    gpfn_max_post = xc_domain_maximum_gpfn(xch, domid);
     if (gpfn_max_prev < 0) {
         free(memmap_info);
         return -1;
@@ -190,7 +190,7 @@ xc_ia64_map_foreign_p2m(xc_interface *xc
     int ret;
     int saved_errno;
 
-    gpfn_max = xc_memory_op(xch, XENMEM_maximum_gpfn, &dom);
+    gpfn_max = xc_domain_maximum_gpfn(xch, dom);
     if (gpfn_max < 0)
         return NULL;
     p2m_size =
diff -r 901ec3e53b42 -r 9c4485d27ea1 tools/libxc/xc_core_x86.c
--- a/tools/libxc/xc_core_x86.c Tue Oct 12 15:06:42 2010 +0100
+++ b/tools/libxc/xc_core_x86.c Tue Oct 12 15:06:42 2010 +0100
@@ -42,7 +42,7 @@ xc_core_arch_gpfn_may_present(struct xc_
 
 static int nr_gpfns(xc_interface *xch, domid_t domid)
 {
-    return xc_memory_op(xch, XENMEM_maximum_gpfn, &domid) + 1;
+    return xc_domain_maximum_gpfn(xch, domid) + 1;
 }
 
 int
diff -r 901ec3e53b42 -r 9c4485d27ea1 tools/libxc/xc_domain.c
--- a/tools/libxc/xc_domain.c   Tue Oct 12 15:06:42 2010 +0100
+++ b/tools/libxc/xc_domain.c   Tue Oct 12 15:06:42 2010 +0100
@@ -578,6 +578,11 @@ int xc_domain_get_tsc_info(xc_interface 
     return rc;
 }
 
+
+int xc_domain_maximum_gpfn(xc_interface *xch, domid_t domid)
+{
+    return xc_memory_op(xch, XENMEM_maximum_gpfn, &domid);
+}
 
 int xc_domain_increase_reservation(xc_interface *xch,
                                    uint32_t domid,
diff -r 901ec3e53b42 -r 9c4485d27ea1 tools/libxc/xc_domain_save.c
--- a/tools/libxc/xc_domain_save.c      Tue Oct 12 15:06:42 2010 +0100
+++ b/tools/libxc/xc_domain_save.c      Tue Oct 12 15:06:42 2010 +0100
@@ -979,7 +979,7 @@ int xc_domain_save(xc_interface *xch, in
     }
 
     /* Get the size of the P2M table */
-    dinfo->p2m_size = xc_memory_op(xch, XENMEM_maximum_gpfn, &dom) + 1;
+    dinfo->p2m_size = xc_domain_maximum_gpfn(xch, dom) + 1;
 
     if ( dinfo->p2m_size > ~XEN_DOMCTL_PFINFO_LTAB_MASK )
     {
diff -r 901ec3e53b42 -r 9c4485d27ea1 tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h     Tue Oct 12 15:06:42 2010 +0100
+++ b/tools/libxc/xenctrl.h     Tue Oct 12 15:06:42 2010 +0100
@@ -784,6 +784,8 @@ int xc_domain_get_tsc_info(xc_interface 
                            uint32_t *incarnation);
 
 int xc_domain_disable_migrate(xc_interface *xch, uint32_t domid);
+
+int xc_domain_maximum_gpfn(xc_interface *xch, domid_t domid);
 
 int xc_domain_increase_reservation(xc_interface *xch,
                                    uint32_t domid,

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.