Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B35DDC4363D for ; Thu, 24 Sep 2020 14:37:07 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2E23523741 for ; Thu, 24 Sep 2020 14:37:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="Jt8aa8Og" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2E23523741 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kLSMe-0005sY-I0; Thu, 24 Sep 2020 14:36:52 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kLSMd-0005sT-S9 for xen-devel@lists.xenproject.org; Thu, 24 Sep 2020 14:36:51 +0000 X-Inumbo-ID: 2d118b29-8823-47c6-9f5d-89b777b71c56 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 2d118b29-8823-47c6-9f5d-89b777b71c56; Thu, 24 Sep 2020 14:36:51 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1600958210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=a11iZA66fIZPc+peMoqf4lIlo+fGT/XEXYOUUx0CayM=; b=Jt8aa8OgAONs2V9LzScXrXjIr/fWS78sI2j74IDHxd4uu2O14YWrVDSQ7Cidi0z2wWWRkM qv6XnmLlDUDXZAOWnzw/yB8/uTa37HBfHOjNQH0pQpHngrL73iydYOz22sG9T1d9qzlRQS Hetsw9XFeaBtUgVuxwBoaVXfJT0du7A= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 49BA9AAC7; Thu, 24 Sep 2020 14:36:50 +0000 (UTC) From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Ian Jackson , Wei Liu Subject: [PATCH] tools/xenstore: set maximum number of grants needed Date: Thu, 24 Sep 2020 16:36:48 +0200 Message-Id: <20200924143648.27861-1-jgross@suse.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" 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 --- 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); talloc_set_destructor(xgt_handle, close_xgt_handle); -- 2.26.2