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

Re: [PATCH] tools/xenstore: set maximum number of grants needed


  • To: Wei Liu <wl@xxxxxxx>, Jürgen Groß <jgross@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Wed, 30 Sep 2020 16:30:16 +0100
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>
  • Delivery-date: Wed, 30 Sep 2020 15:30:26 +0000
  • Ironport-sdr: brWRXmcYitGgS5ETJSC7R+tS7+AUC8flIbVIRXmmRXUxzutnUpRn+Ts7KL0OoPEFKmjyfiqAbt 95O1qJPLOmIbWlAoV53XLgZqipb3GmcgbcVi1Ivbev9M5HW6x1OaWiBp/Q0CEgKqdq+i1S4O6v 8G5UF7fSRPLedtc9kKqS9161oCXM7KWb2Ltk47zCMtu43CGb3vFL5hCr8KtYsYtH5pSP6IERlH ivmV2G7iBL5zD+iI42WVe/1nWE9sLlert/OgqT9UD1u369av0HriavQUSNZ+n3m0QmV7p5804W h/0=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 30/09/2020 16:28, Wei Liu wrote:
> On Wed, Sep 30, 2020 at 05:23:58PM +0200, Jürgen Groß wrote:
>> On 30.09.20 17:14, Wei Liu wrote:
>>> On Thu, Sep 24, 2020 at 04:36:48PM +0200, Juergen Gross wrote:
>>>> 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 <jgross@xxxxxxxx>
>>>> ---
>>>> This is a backport candidate IMO.
>>>> ---
>>>>   tools/xenstore/xenstored_domain.c | 2 ++
>>>>   1 file changed, 2 insertions(+)
>>>>
>>>> diff --git a/tools/xenstore/xenstored_domain.c 
>>>> b/tools/xenstore/xenstored_domain.c
>>>> index 06359503f0..f740aa02f5 100644
>>>> --- a/tools/xenstore/xenstored_domain.c
>>>> +++ b/tools/xenstore/xenstored_domain.c
>>>> @@ -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?
>> Yes. This is the theoretical maximum.
>>
> In that case:
>
> Acked-by: Wei Liu <wl@xxxxxxx>
>
> 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



 


Rackspace

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