From nobody Tue Apr 30 11:44:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1611055125; cv=none; d=zohomail.com; s=zohoarc; b=in5cpDxOrqQ315cnOWIrReKxQ6UCWh1V22/9UBYNDIVLwrEYcU6N/XgFeI4CrEIhk7wi0b6NS9qR9C1Eysfc43Wt/slBa4cyN03GDJjJcr0UGHMNwlmxPIntUocx6OG1Q9LeRQCfXze4PSP5CII4AzVSO8h5wPDw+GC6N7ktPRY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611055125; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=XH//kEYjAh2t0oSaLoBflSdc+RVbBr1IMBNZ1EMW9K0=; b=Qd7ZUcq3t1dRV3xI8sHLao9NxQ6uXMQpZ7RTokCKeZie6LF9Gb/V4sgx9rVuqzFPXndlwWhVCmQnMtnhcODuzRjzOjrn6yQJPGv5gkLxxUS4WXEKyj84DI0tw9vwUkfuxM63FyDPotUcUptE+DSqw6G1EfeHvCtiB803+pFlPxk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1611055125391135.06156070668976; Tue, 19 Jan 2021 03:18:45 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.70274.126072 (Exim 4.92) (envelope-from ) id 1l1p1p-0003WT-6S; Tue, 19 Jan 2021 11:18:29 +0000 Received: by outflank-mailman (output) from mailman id 70274.126072; Tue, 19 Jan 2021 11:18:29 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l1p1p-0003WM-3L; Tue, 19 Jan 2021 11:18:29 +0000 Received: by outflank-mailman (input) for mailman id 70274; Tue, 19 Jan 2021 11:18:27 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l1p1n-0003WG-3g for xen-devel@lists.xenproject.org; Tue, 19 Jan 2021 11:18:27 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 4c52a7d8-42a3-4a3c-b97a-63ad2c66ec7b; Tue, 19 Jan 2021 11:18:26 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 4c52a7d8-42a3-4a3c-b97a-63ad2c66ec7b DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1611055106; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=WVyRXRyDmoQ1fs1F8zXZrojE0+40ErdN2mVWfMq0NTw=; b=ZHTYy1um5ny8CTmPo8iW0+JF08IigTAarpcMf0e3k8P0IFwnk/mcnv9C mQmKKoa5BXI1ZNHtTGGmMbqUO6UyGKeMVaJ5rIQ6nBRz6M13JGun2hI7m qbcHnzWFLdhBwbO3RiNLjWeCBh4WempfBRswL051KFz++yHTHRD/PzPBJ c=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: loBzdUKdIiUmn1LOFqjmTmkms5VSOwcZatdW+WL95pybupjJp7ToNSL9ZmhVJiT4brsAVgj8rr wGDEqE4tZoHh/Al1CU2DB+2LyOnVtYvqbrVjLVlGmfO/3WkhHVgDFwDWLQe5fwA/vKi4+MKg7F PoSWQWjWNCWSpMLmJQou+XQfwPsfNYgIzIw6/F8Y77xNwUooNKcsux2q3jDsTh2TS1gZRLuU3m m/mYbHbNYkmZKnKTwBu6SWQCR+EudFLPf2eB6WO1OsLLlXz+K5dEFLoy6BqQZKqhhsfHdIB6S/ VIs= X-SBRS: 5.1 X-MesageID: 35575485 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.79,358,1602561600"; d="scan'208";a="35575485" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu , Stefano Stabellini , Julien Grall , Volodymyr Babchuk Subject: [PATCH] xen/gnttab: Log when grant_table_init() fails Date: Tue, 19 Jan 2021 11:18:05 +0000 Message-ID: <20210119111805.18295-1-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) ... so debug builds can see what went wrong, rather than getting an unqualified -EINVAL out domain creation. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Wei Liu CC: Stefano Stabellini CC: Julien Grall CC: Volodymyr Babchuk --- xen/common/grant_table.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c index b31d404579..cbdd6e2f4e 100644 --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -1920,7 +1920,11 @@ int grant_table_init(struct domain *d, int max_grant= _frames, if ( max_grant_frames < INITIAL_NR_GRANT_FRAMES || max_grant_frames > opt_max_grant_frames || max_maptrack_frames > opt_max_maptrack_frames ) + { + dprintk(XENLOG_INFO, "Bad grant table sizes: grant %u, maptrack %u= \n", + max_grant_frames, max_maptrack_frames); return -EINVAL; + } =20 if ( (gt =3D xzalloc(struct grant_table)) =3D=3D NULL ) return -ENOMEM; --=20 2.11.0