From nobody Mon Feb 9 14:37:19 2026 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 ARC-Seal: i=1; a=rsa-sha256; t=1619015800; cv=none; d=zohomail.com; s=zohoarc; b=hnBdltNOLUo4Q2Os0yBAjRAQ2SNQONYwsfxsC2lo6qxEMViAnDFGuPc4dlHaknwhS4iFJGij/iuHpVBEUUUK4WaEbFzJXH90S9Yj4B3NrVDM9ngNoDtcregs/w0h36EdF08duLZVP3DncqYoG/wer12ICbDyz3sTskM8zUjPdtQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619015800; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=AC45yiomZKQ6k5JSnBJ7cYzYUAf7Pz4JgaGVf71UzCw=; b=J2yXGRFLoA7VzFCwlNuC41zXgoxZlCajKdmQRNcFoeJ0aGGaLJ2bZWWs2ZBjSPX7oF80/jCGtrEpbXr8poqqHS2a1npVYEZG9RfV72Yf3o9cy87b4ZiKolVnw5fmxrDes6EiJosHKhq6u6piIBBWBRfwUf7eZJnnB8OuqephxXA= 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 Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1619015800604839.3118806958331; Wed, 21 Apr 2021 07:36:40 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.114737.218695 (Exim 4.92) (envelope-from ) id 1lZDxm-0004wd-Hr; Wed, 21 Apr 2021 14:36:22 +0000 Received: by outflank-mailman (output) from mailman id 114737.218695; Wed, 21 Apr 2021 14:36:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lZDxm-0004wW-Em; Wed, 21 Apr 2021 14:36:22 +0000 Received: by outflank-mailman (input) for mailman id 114737; Wed, 21 Apr 2021 14:36:21 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lZDxk-0004wC-W5 for xen-devel@lists.xenproject.org; Wed, 21 Apr 2021 14:36:21 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lZDxk-0001QR-Km; Wed, 21 Apr 2021 14:36:20 +0000 Received: from 54-240-197-235.amazon.com ([54.240.197.235] helo=ua82172827c7b5a.ant.amazon.com) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lZDeE-00045m-Cc; Wed, 21 Apr 2021 14:16:10 +0000 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" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=References:In-Reply-To:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From; bh=AC45yiomZKQ6k5JSnBJ7cYzYUAf7Pz4JgaGVf71UzCw=; b=q 9fcs0VBcq24AbXYCp5y0THWQagtIuCe22ydVxGRjQF5rbCyT+BDPXsR/uVz8Av9WCCIB5O68Lohzk zVwRRpP6irkvMaM5tBS0GS0tsik8fX0GZlxO+oEQMrcONIlFbTihiKY6Yl2+hPt8wUJhJMhFFiP8S 7VQ/72+DpD8kZ34c=; From: Hongyan Xia To: xen-devel@lists.xenproject.org Cc: jgrall@amazon.com, Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu Subject: [PATCH v10 12/13] x86: switch to use domheap page for page tables Date: Wed, 21 Apr 2021 15:15:40 +0100 Message-Id: <8c71fb3f40942030ceb101fba9b1a848686069e3.1619014052.git.hongyxia@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: X-ZohoMail-DKIM: pass (identity @xen.org) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Hongyan Xia Signed-off-by: Wei Liu Signed-off-by: Hongyan Xia Reviewed-by: Jan Beulich --- Changed in v8: - const qualify pg in alloc_xen_pagetable_new(). --- xen/arch/x86/mm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index bf86ba3729aa..604f83c3837e 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -4901,10 +4901,10 @@ mfn_t alloc_xen_pagetable_new(void) { if ( system_state !=3D SYS_STATE_early_boot ) { - void *ptr =3D alloc_xenheap_page(); + const struct page_info *pg =3D alloc_domheap_page(NULL, 0); =20 - BUG_ON(!hardware_domain && !ptr); - return ptr ? virt_to_mfn(ptr) : INVALID_MFN; + BUG_ON(!hardware_domain && !pg); + return pg ? page_to_mfn(pg) : INVALID_MFN; } =20 return alloc_boot_pages(1, 1); @@ -4914,7 +4914,7 @@ mfn_t alloc_xen_pagetable_new(void) void free_xen_pagetable_new(mfn_t mfn) { if ( system_state !=3D SYS_STATE_early_boot && !mfn_eq(mfn, INVALID_MF= N) ) - free_xenheap_page(mfn_to_virt(mfn_x(mfn))); + free_domheap_page(mfn_to_page(mfn)); } =20 void *alloc_mapped_pagetable(mfn_t *pmfn) --=20 2.23.4