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 v7 06/16] xen: add max possible mfn to struct xen_sysctl_physinfo
Date: Tue, 19 Sep 2017 11:58:42 +0200	[thread overview]
Message-ID: <20170919095852.15785-7-jgross@suse.com> (raw)
In-Reply-To: <20170919095852.15785-1-jgross@suse.com>

Add the maximum possible mfn to struct xen_sysctl_physinfo in order to
enable Xen tools to size the grant table frame limits for a domU.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 xen/common/sysctl.c         | 1 +
 xen/include/public/sysctl.h | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/xen/common/sysctl.c b/xen/common/sysctl.c
index a6882d1c9d..22f5d991f6 100644
--- a/xen/common/sysctl.c
+++ b/xen/common/sysctl.c
@@ -266,6 +266,7 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl)
         get_outstanding_claims(&pi->free_pages, &pi->outstanding_pages);
         pi->scrub_pages = 0;
         pi->cpu_khz = cpu_khz;
+        pi->max_mfn = get_upper_mfn_bound() - 1;
         arch_do_physinfo(pi);
 
         if ( copy_to_guest(u_sysctl, op, 1) )
diff --git a/xen/include/public/sysctl.h b/xen/include/public/sysctl.h
index 7830b987da..86b9ced86b 100644
--- a/xen/include/public/sysctl.h
+++ b/xen/include/public/sysctl.h
@@ -108,6 +108,8 @@ struct xen_sysctl_physinfo {
 
     /* XEN_SYSCTL_PHYSCAP_??? */
     uint32_t capabilities;
+
+    uint64_t max_mfn;     /* Largest possible MFN on this host */
 };
 typedef struct xen_sysctl_physinfo xen_sysctl_physinfo_t;
 DEFINE_XEN_GUEST_HANDLE(xen_sysctl_physinfo_t);
-- 
2.12.3


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

  parent reply	other threads:[~2017-09-19  9:59 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-19  9:58 [PATCH v7 00/16] xen: better grant v2 support Juergen Gross
2017-09-19  9:58 ` [PATCH v7 01/16] xen: correct gnttab_get_status_frames() Juergen Gross
2017-09-19  9:58 ` [PATCH v7 02/16] xen: move XENMAPSPACE_grant_table code into grant_table.c Juergen Gross
2017-09-19 10:08   ` Paul Durrant
2017-09-19 15:41     ` Jan Beulich
2017-09-19  9:58 ` [PATCH v7 03/16] xen: clean up grant_table.h Juergen Gross
2017-09-19 15:55   ` Jan Beulich
     [not found]   ` <59C15A04020000780017D047@suse.com>
2017-09-19 16:04     ` Juergen Gross
2017-09-19  9:58 ` [PATCH v7 04/16] xen: add new domctl hypercall to set grant table resource limits Juergen Gross
2017-09-19 10:14   ` Paul Durrant
2017-09-19 10:20     ` Juergen Gross
2017-09-19  9:58 ` [PATCH v7 05/16] xen: add function for obtaining highest possible memory address Juergen Gross
2017-09-19  9:58 ` Juergen Gross [this message]
2017-09-19  9:58 ` [PATCH v7 07/16] libxc: add libxc support for setting grant table resource limits Juergen Gross
2017-09-19 10:59   ` Ian Jackson
2017-09-19  9:58 ` [PATCH v7 08/16] tools: set grant limits for xenstore stubdom Juergen Gross
2017-09-19  9:58 ` [PATCH v7 09/16] libxl: add max possible mfn to libxl_physinfo Juergen Gross
2017-09-19 11:00   ` Ian Jackson
2017-09-19  9:58 ` [PATCH v7 10/16] xl: add global grant limit config items Juergen Gross
2017-09-19 10:59   ` Ian Jackson
2017-09-19  9:58 ` [PATCH v7 11/16] libxl: add libxl support for setting grant table resource limits Juergen Gross
2017-09-19 10:59   ` Ian Jackson
2017-09-19  9:58 ` [PATCH v7 12/16] xen: delay allocation of grant table sub structures Juergen Gross
2017-09-19 10:28   ` Paul Durrant
2017-09-19 10:35     ` Juergen Gross
2017-09-19 10:39       ` Paul Durrant
2017-09-19  9:58 ` [PATCH v7 13/16] xen/arm: move arch specific grant table bits into grant_table.c Juergen Gross
2017-09-19 10:30   ` Paul Durrant
2017-09-19  9:58 ` [PATCH v7 14/16] xen: make grant resource limits per domain Juergen Gross
2017-09-19 10:34   ` Paul Durrant
2017-09-19  9:58 ` [PATCH v7 15/16] xen: make grant table limits boot parameters dom0 only Juergen Gross
2017-09-19  9:58 ` [PATCH v7 16/16] xen: add new Xen cpuid node for max address width info Juergen Gross

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=20170919095852.15785-7-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).