]> xenbits.xensource.com Git - people/dariof/xen.git/commitdiff
libxl: add max possible mfn to libxl_physinfo
authorJuergen Gross <jgross@suse.com>
Thu, 28 Sep 2017 09:07:24 +0000 (11:07 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 28 Sep 2017 09:07:24 +0000 (11:07 +0200)
Add the maximum possible mfn of the host to the libxl_physinfo
data structure.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl.c
tools/libxl/libxl.h
tools/libxl/libxl_types.idl

index 247c56cf830672a2db3cc019422ac569f892a17d..b41ade9fda59bf3b82baf60d5dee2e9c8c7c33df 100644 (file)
@@ -373,6 +373,7 @@ int libxl_get_physinfo(libxl_ctx *ctx, libxl_physinfo *physinfo)
     physinfo->free_pages = xcphysinfo.free_pages;
     physinfo->scrub_pages = xcphysinfo.scrub_pages;
     physinfo->outstanding_pages = xcphysinfo.outstanding_pages;
+    physinfo->max_possible_mfn = xcphysinfo.max_mfn;
     l = xc_sharing_freed_pages(ctx->xch);
     if (l < 0 && errno == ENOSYS) {
         l = 0;
index 7d853ca9247e58f1d5a34bff567ddc5f67269186..fb960debeee2178929cdd67c823e6f59084c234b 100644 (file)
@@ -643,6 +643,15 @@ typedef struct libxl__ctx libxl_ctx;
  */
 #define LIBXL_HAVE_PHYSINFO_OUTSTANDING_PAGES 1
 
+/*
+ * LIBXL_HAVE_PHYSINFO_MAX_POSSIBLE_MFN
+ *
+ * If this is defined, libxl_physinfo structure will contain an uint64 field
+ * called max_possible_mfn, containing the highest possible mfn on this host,
+ * possibly taking memory hotplug into account.
+ */
+#define LIBXL_HAVE_PHYSINFO_MAX_POSSIBLE_MFN 1
+
 /*
  * LIBXL_HAVE_DOMINFO_OUTSTANDING_MEMKB 1
  *
index 756e120ad7cb8f4ccd15451044cf1ffdc2b9ef6c..5d9e7aabba84d66ab7721ab551645f9a9e8cd5d9 100644 (file)
@@ -895,6 +895,7 @@ libxl_physinfo = Struct("physinfo", [
     ("outstanding_pages", uint64),
     ("sharing_freed_pages", uint64),
     ("sharing_used_frames", uint64),
+    ("max_possible_mfn", uint64),
 
     ("nr_nodes", uint32),
     ("hw_cap", libxl_hwcap),