From mboxrd@z Thu Jan 1 00:00:00 1970 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.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 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 A95ECC64E7B for ; Mon, 30 Nov 2020 18:12:17 +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 365482074A for ; Mon, 30 Nov 2020 18:12:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=xen.org header.i=@xen.org header.b="uSdYT+fG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 365482074A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.41380.74505 (Exim 4.92) (envelope-from ) id 1kjneN-0000tc-5Y; Mon, 30 Nov 2020 18:11:47 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 41380.74505; Mon, 30 Nov 2020 18:11:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kjneN-0000tV-1R; Mon, 30 Nov 2020 18:11:47 +0000 Received: by outflank-mailman (input) for mailman id 41380; Mon, 30 Nov 2020 18:11:45 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kjneL-0000tQ-5O for xen-devel@lists.xenproject.org; Mon, 30 Nov 2020 18:11:45 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kjneH-0003AP-Vv; Mon, 30 Nov 2020 18:11:41 +0000 Received: from 54-240-197-239.amazon.com ([54.240.197.239] helo=edge-cache-235.e-lhr50.amazon.com) by xenbits.xenproject.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kjneH-0008CH-J5; Mon, 30 Nov 2020 18:11:41 +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:Content-Type: References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID; bh=ndgVYZCrNmPbecjhfCy3ZQaLH0zpEGe05VzAmEtBl2s=; b=uSdYT+fG9DAb6Pm4Dlo2z0CP+L cusBBvqmPk1HkhAm+j6a7G+tcY8aUK0dlvh7vK8kCXfpkWmoaGeLCftR3JAiJVMKjjSBl0rDJisOf gcf/Z3jvpeimbe3IpS5s4iBEovARFM1juI8Qyl044J1dSfw9T42EaQOZjz+2cGvxvRl8=; Message-ID: <8118aa61528cb14acab8a399bd483557bd3c921e.camel@xen.org> Subject: Re: [PATCH 04/16] x86/srat: vmap the pages for acpi_slit From: Hongyan Xia To: Jan Beulich Cc: julien@xen.org, Andrew Cooper , Wei Liu , Roger Pau =?ISO-8859-1?Q?Monn=E9?= , xen-devel@lists.xenproject.org Date: Mon, 30 Nov 2020 18:11:38 +0000 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit On Mon, 2020-11-30 at 11:16 +0100, Jan Beulich wrote: > On 30.04.2020 22:44, Hongyan Xia wrote: > > --- a/xen/arch/x86/srat.c > > +++ b/xen/arch/x86/srat.c > > @@ -196,7 +196,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_boot_pages(mfn, PFN_UP(slit->header.length)); > > + BUG_ON(!acpi_slit); > > memcpy(acpi_slit, slit, slit->header.length); > > } > > I'm not sure in how far this series is still to be considered > active / pending; I still have it in my inbox as something to > look at in any event. If it is, then I think the latest by this > patch it becomes clear that we either want to make vmalloc() > boot-allocator capable, or introduce e.g. vmalloc_boot(). > Having this recurring pattern including the somewhat odd > vmap_boot_pages() is imo not the best way forward. It would > then also no longer be necessary to allocate contiguous pages, > as none of the users up to here appear to have such a need. This series is blocked on the PTE domheap conversion series so I will definitely come back here after that series is merged. vmap_boot_pages() (poorly named, there is nothing "boot" about it) is actually useful in other patches as well, especially when there is no direct map but we need to map a contiguous range, since map_domain_page() can only handle a single one. So I would say there will be a need for this function (maybe call it vmap_contig_pages()?) even if for this patch a boot-capable vmalloc can do the job. Hongyan