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 03/11] tools: set grant limits for xenstore stubdom
Date: Mon, 25 Sep 2017 12:00:27 +0200 [thread overview]
Message-ID: <20170925100035.432-4-jgross@suse.com> (raw)
In-Reply-To: <20170925100035.432-1-jgross@suse.com>
When creating a Xenstore stubdom set the grant limits: the stubdom
will need to setup a very limited amount of grants only, so 4 grant
frames are enough. For being able to support up to 32768 domains it
will need 128 maptrack frames (1 mapping per domain, 256 maptrack
entries per maptrack frame).
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
---
tools/helpers/init-xenstore-domain.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/tools/helpers/init-xenstore-domain.c b/tools/helpers/init-xenstore-domain.c
index 8a41ee7d3a..047ad0cb1d 100644
--- a/tools/helpers/init-xenstore-domain.c
+++ b/tools/helpers/init-xenstore-domain.c
@@ -105,6 +105,17 @@ static int build(xc_interface *xch)
fprintf(stderr, "xc_domain_setmaxmem failed\n");
goto err;
}
+ /*
+ * 1 grant frame is enough: we don't need many grants.
+ * Mini-OS doesn't like less than 4, though, so use 4.
+ * 128 maptrack frames: 256 entries per frame, enough for 32768 domains.
+ */
+ rv = xc_domain_set_gnttab_limits(xch, domid, 4, 128);
+ if ( rv )
+ {
+ fprintf(stderr, "xc_domain_set_gnttab_limits failed\n");
+ goto err;
+ }
rv = xc_domain_set_memmap_limit(xch, domid, limit_kb);
if ( rv )
{
--
2.12.3
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev 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 ` Juergen Gross [this message]
2017-09-25 10:00 ` [PATCH v10 04/11] libxl: add max possible mfn to libxl_physinfo Juergen Gross
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-4-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).