From patchwork Fri Dec 16 11:48:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 13074955 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id CBD02C4167B for ; Fri, 16 Dec 2022 11:49:15 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.464430.722865 (Exim 4.92) (envelope-from ) id 1p69D9-0004oz-8C; Fri, 16 Dec 2022 11:49:07 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 464430.722865; Fri, 16 Dec 2022 11:49:07 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p69D9-0004nY-1i; Fri, 16 Dec 2022 11:49:07 +0000 Received: by outflank-mailman (input) for mailman id 464430; Fri, 16 Dec 2022 11:49:05 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p69D7-0004Mt-6w for xen-devel@lists.xenproject.org; Fri, 16 Dec 2022 11:49:05 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p69D7-0002E2-0I; Fri, 16 Dec 2022 11:49:05 +0000 Received: from 54-240-197-232.amazon.com ([54.240.197.232] helo=dev-dsk-jgrall-1b-035652ec.eu-west-1.amazon.com) by xenbits.xenproject.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1p69D6-0004sN-P3; Fri, 16 Dec 2022 11:49:04 +0000 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=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=5oXMYhVrHa49EzlJyprSVvBAT8KPYfOFRwrMrA+Sn68=; b=cozlDAIvwTjD7N7KnGv9QUb1tK RwpSbCKYNRGaLSAwm1RH81K6v1OQRWDNz50vS5jiFMSZ7gaBC4IJSX72+xq8eQSN74nGX7o4FXLis vgi2fp7BbNeQO032Dw7wgX1vazlY4k215QZO1/kmKWTxmVfNhSW5Q2afmlqeB49atO/8=; From: Julien Grall To: xen-devel@lists.xenproject.org Cc: julien@xen.org, Hongyan Xia , Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Wei Liu , Julien Grall Subject: [PATCH 05/22] x86/srat: vmap the pages for acpi_slit Date: Fri, 16 Dec 2022 11:48:36 +0000 Message-Id: <20221216114853.8227-6-julien@xen.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221216114853.8227-1-julien@xen.org> References: <20221216114853.8227-1-julien@xen.org> MIME-Version: 1.0 From: Hongyan Xia This avoids the assumption that boot pages are in the direct map. Signed-off-by: Hongyan Xia Signed-off-by: Julien Grall ---- Changes since Hongyan's version: * vmap_boot_pages() was renamed to vmap_contig_pages() Reviewed-by: Jan Beulich --- xen/arch/x86/srat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/srat.c b/xen/arch/x86/srat.c index 56749ddca526..1fd178e89d28 100644 --- a/xen/arch/x86/srat.c +++ b/xen/arch/x86/srat.c @@ -139,7 +139,8 @@ void __init acpi_numa_slit_init(struct acpi_table_slit *slit) return; } mfn = alloc_boot_pages(PFN_UP(slit->header.length), 1); - acpi_slit = mfn_to_virt(mfn_x(mfn)); + acpi_slit = vmap_contig_pages(mfn, PFN_UP(slit->header.length)); + BUG_ON(!acpi_slit); memcpy(acpi_slit, slit, slit->header.length); }