xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: xen-devel@lists.xenproject.org
Cc: Juergen Gross <jgross@suse.com>,
	sstabellini@kernel.org, wei.liu2@citrix.com,
	George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com,
	ian.jackson@eu.citrix.com, tim@xen.org, julien.grall@arm.com,
	jbeulich@suse.com, dgdegra@tycho.nsa.gov
Subject: [PATCH v10 04/11] libxl: add max possible mfn to libxl_physinfo
Date: Mon, 25 Sep 2017 12:00:28 +0200	[thread overview]
Message-ID: <20170925100035.432-5-jgross@suse.com> (raw)
In-Reply-To: <20170925100035.432-1-jgross@suse.com>

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         | 1 +
 tools/libxl/libxl.h         | 9 +++++++++
 tools/libxl/libxl_types.idl | 1 +
 3 files changed, 11 insertions(+)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 247c56cf83..b41ade9fda 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -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;
diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h
index 7d853ca924..fb960debee 100644
--- a/tools/libxl/libxl.h
+++ b/tools/libxl/libxl.h
@@ -644,6 +644,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
  *
  * If this is defined, libxl_dominfo will contain a MemKB type field called
diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
index 756e120ad7..5d9e7aabba 100644
--- a/tools/libxl/libxl_types.idl
+++ b/tools/libxl/libxl_types.idl
@@ -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),
-- 
2.12.3


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2017-09-25 10:00 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-25 10:00 [PATCH v10 00/11] xen: better grant v2 support Juergen Gross
2017-09-25 10:00 ` [PATCH v10 01/11] xen: add function for obtaining highest possible memory address Juergen Gross
2017-09-25 10:19   ` Jan Beulich
2017-09-28  0:29   ` Julien Grall
2017-09-25 10:00 ` [PATCH v10 02/11] libxc: add libxc support for setting grant table resource limits Juergen Gross
2017-09-25 10:00 ` [PATCH v10 03/11] tools: set grant limits for xenstore stubdom Juergen Gross
2017-09-25 10:00 ` Juergen Gross [this message]
2017-09-25 10:00 ` [PATCH v10 05/11] xl: add global grant limit config items Juergen Gross
2017-09-25 10:00 ` [PATCH v10 06/11] libxl: add libxl support for setting grant table resource limits Juergen Gross
2017-09-25 10:00 ` [PATCH v10 07/11] xen: delay allocation of grant table sub structures Juergen Gross
2017-09-25 10:16   ` Jan Beulich
2017-09-28 18:56   ` Andrew Cooper
2017-09-29  4:27     ` Juergen Gross
2017-09-25 10:00 ` [PATCH v10 08/11] xen/arm: move arch specific grant table bits into grant_table.c Juergen Gross
2017-09-28  0:31   ` Julien Grall
2017-09-25 10:00 ` [PATCH v10 09/11] xen: make grant resource limits per domain Juergen Gross
2017-09-25 11:49   ` Jan Beulich
2017-09-28  0:26   ` Julien Grall
2017-09-28  7:21     ` Juergen Gross
2017-09-25 10:00 ` [PATCH v10 10/11] xen: add new Xen cpuid node for max address width info Juergen Gross
2017-09-25 11:55   ` Andrew Cooper
2017-09-25 12:00     ` Juergen Gross
2017-09-25 12:02       ` Andrew Cooper
2017-09-25 12:03       ` Jan Beulich
2017-09-25 11:59   ` Jan Beulich
2017-09-28  8:59   ` Jan Beulich
     [not found]   ` <59CCD61D0200007800180567@suse.com>
2017-09-28  9:04     ` Juergen Gross
2017-09-28  9:40       ` Jan Beulich
     [not found]       ` <59CCDFBD02000078001805E9@suse.com>
2017-09-28  9:52         ` Juergen Gross
2017-09-28 10:05           ` Jan Beulich
2017-09-25 10:00 ` [PATCH v10 11/11] xen: add some comments in include/public/arch-x86/cpuid.h Juergen Gross
2017-09-25 12:01   ` Jan Beulich
2017-09-28 11:50     ` George Dunlap
2017-09-28 11:54       ` Jan Beulich
2017-09-28 19:24         ` Julien Grall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170925100035.432-5-jgross@suse.com \
    --to=jgross@suse.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien.grall@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).