Hi Juergen,
On 20/09/17 07:34, Juergen Gross wrote:
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 <jgr...@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 */
Don't you need to bump XEN_SYSCTL_INTERFACE_VERSION because of this change?
};
typedef struct xen_sysctl_physinfo xen_sysctl_physinfo_t;
DEFINE_XEN_GUEST_HANDLE(xen_sysctl_physinfo_t);
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel