From nobody Sat Feb 7 06:54:43 2026 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1583746559; cv=none; d=zohomail.com; s=zohoarc; b=FC7bBgzuJjbqdlgqEZKUrnVT/WXUXCPCS4Jk4ABqKn95UylmYJzh6GA1Fs8Nvp4n9+VYVyIozaDZqUnqLsLYbtGPTd11T3yr9oKNhXmRBk6vz58elibty9oLfPtIHJKXjuwAvyzyJ+qa0gCMlWeTimikrEBLSIqg9Sn/Ov98nsI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583746559; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jNPaXB/Lq/dAYc9YrOfVUKExwQV5Zg3fmFH0hdG5W0Q=; b=OLGYqCXVhJgdcOsE4ei7cdIPqFemN+GwGrnJxjs5Ml78dpJtyUaDdJd13C/bZLzzpXXUTX1PIPgibL7kaaQ1rTjUdFg8psL7SiLwMgr1MnLoc5XsQxK0KpPrsikiGQl/2y0m/cBdZjtlkEX8basymOM5Yu+7rrFUgFJtKP6sILk= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1583746559735846.7274915115115; Mon, 9 Mar 2020 02:35:59 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jBEol-000355-C8; Mon, 09 Mar 2020 09:35:23 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jBEoj-00034B-Hl for xen-devel@lists.xenproject.org; Mon, 09 Mar 2020 09:35:21 +0000 Received: from smtp-fw-33001.amazon.com (unknown [207.171.190.10]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 4b34329e-61e9-11ea-b52f-bc764e2007e4; Mon, 09 Mar 2020 09:35:21 +0000 (UTC) Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-2c-397e131e.us-west-2.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-33001.sea14.amazon.com with ESMTP; 09 Mar 2020 09:35:20 +0000 Received: from EX13MTAUEA002.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan3.pdx.amazon.com [10.170.41.166]) by email-inbound-relay-2c-397e131e.us-west-2.amazon.com (Postfix) with ESMTPS id 8E169A2C1C; Mon, 9 Mar 2020 09:35:19 +0000 (UTC) Received: from EX13D32EUC001.ant.amazon.com (10.43.164.159) by EX13MTAUEA002.ant.amazon.com (10.43.61.77) with Microsoft SMTP Server (TLS) id 15.0.1236.3; Mon, 9 Mar 2020 09:35:19 +0000 Received: from EX13MTAUEA001.ant.amazon.com (10.43.61.82) by EX13D32EUC001.ant.amazon.com (10.43.164.159) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 9 Mar 2020 09:35:17 +0000 Received: from u2f063a87eabd5f.cbg10.amazon.com (10.125.106.135) by mail-relay.amazon.com (10.43.61.243) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Mon, 9 Mar 2020 09:35:16 +0000 X-Inumbo-ID: 4b34329e-61e9-11ea-b52f-bc764e2007e4 IronPort-SDR: G9YbFJXgEyh8vGFiMH96/b8V4JGb1O8LfXN5mkzjAEWD4t0XaEdiQqnak2WAEowTGb0kKLMcgG 0AnAlXTPE9xQ== X-IronPort-AV: E=Sophos;i="5.70,532,1574121600"; d="scan'208";a="31422991" From: To: Date: Mon, 9 Mar 2020 09:35:07 +0000 Message-ID: <20200309093511.1727-3-paul@xen.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200309093511.1727-1-paul@xen.org> References: <20200309093511.1727-1-paul@xen.org> MIME-Version: 1.0 Precedence: Bulk Subject: [Xen-devel] [PATCH v4 2/6] x86 / p2m: remove page_list check in p2m_alloc_table... X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Wei Liu , Paul Durrant , Andrew Cooper , Paul Durrant , George Dunlap , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" From: Paul Durrant ... and replace with a check of domain_tot_pages(). The check of page_list prevents the prior allocation of PGC_extra pages, whereas what the code is trying to verify is that the toolstack has not already RAM for the domain. Signed-off-by: Paul Durrant Reviewed-by: Jan Beulich --- Cc: Jan Beulich Cc: Andrew Cooper Cc: George Dunlap Cc: Wei Liu Cc: "Roger Pau Monn=C3=A9" v4: - Re-worked so as not to completely remove the check v2: - New in v2 --- xen/arch/x86/mm/p2m.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c index 3719deae77..9f51370327 100644 --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -695,8 +695,7 @@ int p2m_alloc_table(struct p2m_domain *p2m) =20 p2m_lock(p2m); =20 - if ( p2m_is_hostp2m(p2m) - && !page_list_empty(&d->page_list) ) + if ( p2m_is_hostp2m(p2m) && domain_tot_pages(d) ) { P2M_ERROR("dom %d already has memory allocated\n", d->domain_id); p2m_unlock(p2m); --=20 2.20.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel