[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging] tools/xenstore: set maximum number of grants needed



commit 11852c7bb070a18c3708b4c001772a23e7d4fc27
Author:     Juergen Gross <jgross@xxxxxxxx>
AuthorDate: Thu Sep 24 16:36:48 2020 +0200
Commit:     Wei Liu <wl@xxxxxxx>
CommitDate: Wed Sep 30 15:34:50 2020 +0000

    tools/xenstore: set maximum number of grants needed
    
    When running as a stubdom Xenstore should set the maximum number of
    grants needed via a call of xengnttab_set_max_grants(), as otherwise
    the number of domains which can be supported will be 128 only (the
    default number of grants supported by Mini-OS).
    
    We use one grant per domain so the theoretical maximum number is
    DOMID_FIRST_RESERVED.
    
    Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
    Acked-by: Wei Liu <wl@xxxxxxx>
---
 tools/xenstore/xenstored_domain.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/xenstore/xenstored_domain.c 
b/tools/xenstore/xenstored_domain.c
index 06359503f0..0d5495745b 100644
--- a/tools/xenstore/xenstored_domain.c
+++ b/tools/xenstore/xenstored_domain.c
@@ -631,6 +631,12 @@ void domain_init(void)
        if (*xgt_handle == NULL)
                barf_perror("Failed to open connection to gnttab");
 
+       /*
+        * Allow max number of domains for mappings. We allow one grant per
+        * domain so the theoretical maximum is DOMID_FIRST_RESERVED.
+        */
+       xengnttab_set_max_grants(*xgt_handle, DOMID_FIRST_RESERVED);
+
        talloc_set_destructor(xgt_handle, close_xgt_handle);
 
        xce_handle = xenevtchn_open(NULL, 0);
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.