diff options
author | Keir Fraser <keir@xensource.com> | 2007-04-25 22:22:31 +0100 |
---|---|---|
committer | Keir Fraser <keir@xensource.com> | 2007-04-25 22:22:31 +0100 |
commit | 259e50f5931342885c2c47460d8c57f7e732f798 (patch) | |
tree | d8fd77a837b2199d8a72d26ba08258e7a3219f1a /tools/libxc/xc_core_x86.c | |
parent | 6a9e6c9dc38ec197c4c235b41719ddfef00778dd (diff) | |
download | xen-259e50f5931342885c2c47460d8c57f7e732f798.tar.gz xen-259e50f5931342885c2c47460d8c57f7e732f798.tar.bz2 xen-259e50f5931342885c2c47460d8c57f7e732f798.zip |
xen: Fix maximum_gpfn() hypercall to always return max_gpfn not nr_gpfns.
Fix callers to convert this to nr_gpfns (aka p2m_size) if that's what
they actually need.
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'tools/libxc/xc_core_x86.c')
-rw-r--r-- | tools/libxc/xc_core_x86.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/libxc/xc_core_x86.c b/tools/libxc/xc_core_x86.c index 0f2a19c451..b3d5d26fbf 100644 --- a/tools/libxc/xc_core_x86.c +++ b/tools/libxc/xc_core_x86.c @@ -21,9 +21,9 @@ #include "xg_private.h" #include "xc_core.h" -static int max_gpfn(int xc_handle, domid_t domid) +static int nr_gpfns(int xc_handle, domid_t domid) { - return xc_memory_op(xc_handle, XENMEM_maximum_gpfn, &domid); + return xc_memory_op(xc_handle, XENMEM_maximum_gpfn, &domid) + 1; } int @@ -38,7 +38,7 @@ xc_core_arch_memory_map_get(int xc_handle, xc_dominfo_t *info, xc_core_memory_map_t **mapp, unsigned int *nr_entries) { - unsigned long p2m_size = max_gpfn(xc_handle, info->domid); + unsigned long p2m_size = nr_gpfns(xc_handle, info->domid); xc_core_memory_map_t *map; map = malloc(sizeof(*map)); @@ -65,7 +65,7 @@ xc_core_arch_map_p2m(int xc_handle, xc_dominfo_t *info, xen_pfn_t *live_p2m_frame_list_list = NULL; xen_pfn_t *live_p2m_frame_list = NULL; uint32_t dom = info->domid; - unsigned long p2m_size = max_gpfn(xc_handle, info->domid); + unsigned long p2m_size = nr_gpfns(xc_handle, info->domid); int ret = -1; int err; |