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=-8.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 1743FC433E0 for ; Tue, 19 May 2020 16:55:48 +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 C71CC20657 for ; Tue, 19 May 2020 16:55:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=xen.org header.i=@xen.org header.b="dD57fle5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C71CC20657 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 localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jb5WM-0001Gl-Pj; Tue, 19 May 2020 16:55:14 +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 1jb5WL-0001Gg-LM for xen-devel@lists.xenproject.org; Tue, 19 May 2020 16:55:13 +0000 X-Inumbo-ID: 818b6d5e-99f1-11ea-a952-12813bfff9fa Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 818b6d5e-99f1-11ea-a952-12813bfff9fa; Tue, 19 May 2020 16:55:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=gto+boTdw2omfbvehY12Pb4RamepkHtOCM4G5Kfb5+k=; b=dD57fle5yNNRL4AmhWyQZvSUaS /GTI8o8LC1/9MPfaTPWqFcFAyI54oIoxYpmErIQ//5jdfGPG5Pst3The0nhHSLIYOF1GG8RgfmwMN TPcfz5QgduPz51XlvyKwgePJL0/NVkv7elv+3Xo5pzSuMrzq6EWn3UY6zw+wBPxGy5LU=; Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jb5WH-00068L-HT; Tue, 19 May 2020 16:55:09 +0000 Received: from 54-240-197-225.amazon.com ([54.240.197.225] helo=a483e7b01a66.ant.amazon.com) by xenbits.xenproject.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1jb5WH-00026d-AD; Tue, 19 May 2020 16:55:09 +0000 Subject: Re: [PATCH for-4.14 2/3] xen/arm: Take into account the DMA width when allocating Dom0 memory banks To: Volodymyr Babchuk , "xen-devel@lists.xenproject.org" References: <20200518113008.15422-1-julien@xen.org> <20200518113008.15422-3-julien@xen.org> From: Julien Grall Message-ID: Date: Tue, 19 May 2020 17:55:07 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: "jeff.kubascik@dornerworks.com" , "jgrall@amazon.com" , "sstabellini@kernel.org" , "roman@zededa.com" , "minyard@acm.org" Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On 18/05/2020 21:34, Volodymyr Babchuk wrote: > Hi Julien, Hi Volodymyr, Thank you for the review. > > On Mon, 2020-05-18 at 12:30 +0100, Julien Grall wrote: >> From: Julien Grall >> >> At the moment, Xen is assuming that all the devices are at least 32-bit >> DMA capable. However, some SoCs have devices that may be able to access >> a much restricted range. For instance, the Raspberry PI 4 has devices >> that can only access the first GB of RAM. >> >> The function arch_get_dma_bit_size() will return the lowest DMA width on >> the platform. Use it to decide what is the limit for the low memory. >> >> Signed-off-by: Julien GralL >> --- >> xen/arch/arm/domain_build.c | 32 +++++++++++++++++++------------- >> 1 file changed, 19 insertions(+), 13 deletions(-) >> >> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c >> index 430708753642..abc4e463d27c 100644 >> --- a/xen/arch/arm/domain_build.c >> +++ b/xen/arch/arm/domain_build.c >> @@ -211,10 +211,13 @@ fail: >> * the ramdisk and DTB must be placed within a certain proximity of >> * the kernel within RAM. >> * 3. For dom0 we want to place as much of the RAM as we reasonably can >> - * below 4GB, so that it can be used by non-LPAE enabled kernels (32-bit) >> + * below 4GB, so that it can be used by non-LPAE enabled kernels (32-bit). > Is full stop really needed there? I was meant to remove the line below as it is now part of 4). I will remove it in the next version. Best regards, -- Julien Grall