tools/xenstore: set maximum number of grants needed
PATCH 1/1 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).
---
This is a backport candidate IMO.
--- tools/xenstore/xenstored_domain.c | 2 ++ 1 file changed, 2 insertions(+)
tools/xenstore/xenstored_domain.c +2 -0
@@ -630,6 +630,8 @@ void domain_init(void) *xgt_handle =xengnttab_open (NULL ,0 );if (*xgt_handle ==NULL )barf_perror ("Failed to open connection to gnttab" ); +/* Allow max number of domains for mappings. */ +xengnttab_set_max_grants (*xgt_handle,DOMID_FIRST_RESERVED );talloc_set_destructor (xgt_handle, close_xgt_handle);
Signature · 1 line
2.26.2
Quoted 17 lines · Juergen Gross
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).Signed-off-by Juergen Gross <[email protected]>---
This is a backport candidate IMO.--- tools/xenstore/xenstored_domain.c | 2 ++ 1 file changed, 2 insertions(+)tools/xenstore/xenstored_domain.c +0
-0
tools/xenstore/xenstored_domain.c void domain_init(void) · line 634
Quoted 5 lines
tools/xenstore/xenstored_domain.c +2
-0@@ -630,6 +630,8 @@ void domain_init(void) *xgt_handle =xengnttab_open (NULL ,0 );if (*xgt_handle ==NULL )barf_perror ("Failed to open connection to gnttab" ); +/* Allow max number of domains for mappings. */ +xengnttab_set_max_grants (*xgt_handle,DOMID_FIRST_RESERVED );
Why DOMID_FIRST_RESERVED as the count argument? Is the expectation here xenstored maps one grant per domain?
Wei.
Quoted 6 lines
tools/xenstore/xenstored_domain.c +0
-0talloc_set_destructor (xgt_handle, close_xgt_handle);Signature · 1 line
2.26.2
Quoted 13 lines · Wei Liu
Quoted 12 lines · Juergen Gross
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).Signed-off-by Juergen Gross <[email protected]>---
This is a backport candidate IMO.--- tools/xenstore/xenstored_domain.c | 2 ++ 1 file changed, 2 insertions(+)
Quoted 13 lines
tools/xenstore/xenstored_domain.c void domain_init(void) · line 634
Quoted 10 lines
tools/xenstore/xenstored_domain.c +2
-0@@ -630,6 +630,8 @@ void domain_init(void) *xgt_handle =xengnttab_open (NULL ,0 );if (*xgt_handle ==NULL )barf_perror ("Failed to open connection to gnttab" ); +/* Allow max number of domains for mappings. */ +xengnttab_set_max_grants (*xgt_handle,DOMID_FIRST_RESERVED );Why
DOMID_FIRST_RESERVEDas the count argument? Is the expectation here xenstored maps one grant per domain?
Yes. This is the theoretical maximum.
Juergen
Wei Liu
Acked-byQuoted 28 lines · Jürgen Groß
Quoted 13 lines · Wei Liu
Quoted 12 lines · Juergen Gross
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).Signed-off-by Juergen Gross <[email protected]>---
This is a backport candidate IMO.--- tools/xenstore/xenstored_domain.c | 2 ++ 1 file changed, 2 insertions(+)Quoted 13 lines
tools/xenstore/xenstored_domain.c void domain_init(void) · line 634
Quoted 10 lines
tools/xenstore/xenstored_domain.c +2
-0@@ -630,6 +630,8 @@ void domain_init(void) *xgt_handle =xengnttab_open (NULL ,0 );if (*xgt_handle ==NULL )barf_perror ("Failed to open connection to gnttab" ); +/* Allow max number of domains for mappings. */ +xengnttab_set_max_grants (*xgt_handle,DOMID_FIRST_RESERVED );Why
DOMID_FIRST_RESERVEDas the count argument? Is the expectation here xenstored maps one grant per domain?
Quoted 2 lines
Yes. This is the theoretical maximum.
In that case:
I will also add that information to the commit message.
Quoted 2 lines
Juergen
Quoted 27 lines · Wei Liu
Quoted 26 lines · Jürgen Groß
Quoted 25 lines · Wei Liu
Quoted 17 lines · Juergen Gross
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).Signed-off-by Juergen Gross <[email protected]>---
This is a backport candidate IMO.--- tools/xenstore/xenstored_domain.c | 2 ++ 1 file changed, 2 insertions(+)tools/xenstore/xenstored_domain.c +0
-0tools/xenstore/xenstored_domain.c void domain_init(void) · line 634
Quoted 5 lines
tools/xenstore/xenstored_domain.c +2
-0@@ -630,6 +630,8 @@ void domain_init(void) *xgt_handle =xengnttab_open (NULL ,0 );if (*xgt_handle ==NULL )barf_perror ("Failed to open connection to gnttab" ); +/* Allow max number of domains for mappings. */ +xengnttab_set_max_grants (*xgt_handle,DOMID_FIRST_RESERVED );Why
DOMID_FIRST_RESERVEDas the count argument? Is the expectation here xenstored maps one grant per domain?
Quoted 7 lines
Quoted 2 lines
Yes. This is the theoretical maximum.
In that case:
Acked-by Wei Liu <[email protected]>I will also add that information to the commit message.
And the comment if possible please. That's where it will be most useful to the next person doing a doubletake at this code. :)
~Andrew
Quoted 30 lines · Andrew Cooper
Quoted 29 lines · Wei Liu
Quoted 28 lines · Jürgen Groß
Quoted 13 lines · Wei Liu
Quoted 12 lines · Juergen Gross
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).Signed-off-by Juergen Gross <[email protected]>---
This is a backport candidate IMO.--- tools/xenstore/xenstored_domain.c | 2 ++ 1 file changed, 2 insertions(+)Quoted 12 lines
tools/xenstore/xenstored_domain.c void domain_init(void) · line 634
Quoted 10 lines
tools/xenstore/xenstored_domain.c +2
-0@@ -630,6 +630,8 @@ void domain_init(void) *xgt_handle =xengnttab_open (NULL ,0 );if (*xgt_handle ==NULL )barf_perror ("Failed to open connection to gnttab" ); +/* Allow max number of domains for mappings. */ +xengnttab_set_max_grants (*xgt_handle,DOMID_FIRST_RESERVED );Why
DOMID_FIRST_RESERVEDas the count argument? Is the expectation here xenstored maps one grant per domain?Yes. This is the theoretical maximum.
Quoted 8 lines
Quoted 5 lines
In that case:
Acked-by Wei Liu <[email protected]>I will also add that information to the commit message.
And the comment if possible please. That's where it will be most useful to the next person doing a doubletake at this code. :)
Yes sure.
Wei.
Quoted 2 lines
~Andrew