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

[Xen-changelog] [xen-unstable] libxc: add xc_maximum_ram_page to wrap XENMEM_maximum_ram_page



# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1287418645 -3600
# Node ID 1cdf5cf3868551c1fb91e0b3895d176823e25171
# Parent  9bb14bf353a8ddddbeb8e605171db6795a3f4085
libxc: add xc_maximum_ram_page to wrap XENMEM_maximum_ram_page

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/libxc/xc_offline_page.c |    2 +-
 tools/libxc/xc_private.c      |    4 ++++
 tools/libxc/xenctrl.h         |    3 +++
 tools/libxc/xg_save_restore.h |    2 +-
 4 files changed, 9 insertions(+), 2 deletions(-)

diff -r 9bb14bf353a8 -r 1cdf5cf38685 tools/libxc/xc_offline_page.c
--- a/tools/libxc/xc_offline_page.c     Mon Oct 18 17:16:59 2010 +0100
+++ b/tools/libxc/xc_offline_page.c     Mon Oct 18 17:17:25 2010 +0100
@@ -271,7 +271,7 @@ static int init_mem_info(xc_interface *x
 
     dinfo->p2m_size = minfo->p2m_size;
 
-    minfo->max_mfn = xc_memory_op(xch, XENMEM_maximum_ram_page, NULL);
+    minfo->max_mfn = xc_maximum_ram_page(xch);
     if ( !(minfo->m2p_table =
         xc_map_m2p(xch, minfo->max_mfn, PROT_READ, NULL)) )
     {
diff -r 9bb14bf353a8 -r 1cdf5cf38685 tools/libxc/xc_private.c
--- a/tools/libxc/xc_private.c  Mon Oct 18 17:16:59 2010 +0100
+++ b/tools/libxc/xc_private.c  Mon Oct 18 17:17:25 2010 +0100
@@ -533,6 +533,10 @@ int xc_memory_op(xc_interface *xch,
     return ret;
 }
 
+long xc_maximum_ram_page(xc_interface *xch)
+{
+    return xc_memory_op(xch, XENMEM_maximum_ram_page, NULL);
+}
 
 long long xc_domain_get_cpu_usage( xc_interface *xch, domid_t domid, int vcpu )
 {
diff -r 9bb14bf353a8 -r 1cdf5cf38685 tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h     Mon Oct 18 17:16:59 2010 +0100
+++ b/tools/libxc/xenctrl.h     Mon Oct 18 17:17:25 2010 +0100
@@ -981,6 +981,9 @@ long xc_get_max_pages(xc_interface *xch,
 
 int xc_mmuext_op(xc_interface *xch, struct mmuext_op *op, unsigned int nr_ops,
                  domid_t dom);
+
+/* System wide memory properties */
+long xc_maximum_ram_page(xc_interface *xch);
 
 int xc_memory_op(xc_interface *xch, int cmd, void *arg);
 
diff -r 9bb14bf353a8 -r 1cdf5cf38685 tools/libxc/xg_save_restore.h
--- a/tools/libxc/xg_save_restore.h     Mon Oct 18 17:16:59 2010 +0100
+++ b/tools/libxc/xg_save_restore.h     Mon Oct 18 17:17:25 2010 +0100
@@ -179,7 +179,7 @@ static inline int get_platform_info(xc_i
     if (xc_version(xch, XENVER_capabilities, &xen_caps) != 0)
         return 0;
 
-    *max_mfn = xc_memory_op(xch, XENMEM_maximum_ram_page, NULL);
+    *max_mfn = xc_maximum_ram_page(xch);
 
     *hvirt_start = xen_params.virt_start;
 

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


 


Rackspace

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