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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 1F749C4332F for ; Wed, 23 Nov 2022 06:38:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=whK+HjlL+C3IL2CqsWPx9crWyOEOPljdC1WrtNbQPNk=; b=M2so80FI1mYGoK wZIz61E0tm3y9EGW5U3icbHfXwBnz1Sjds6dX5IhI2rtUUTkJtEtPh+e4TaO1q+NCPbxhUhlUdFo8 +brAqpC+H+EL32pqFpYfVJoCQV7NxbGJpUf7nJtjAv6R8kF/A8WYRSZ5lr5EKeYmW/iaN8PJ/Cxuq bRo1KhI7ktQ3O9teLzs3KsHj3aYxUhUOnCJzpwxNS8dGxIDCPh3gJQVLHrXkL2Nh9lFU0CtJZPQFz OdqvI7TrXonymgPG4xtDwVQb7WyTSLt9Olo9RZ/LptjQHIMpjOKiQHvD+qCAD1YSApogftQx1lXA3 vhWgF4LE2+1iPcHvxaMQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oxjNg-00EmCa-1E; Wed, 23 Nov 2022 06:37:13 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oxjGr-00EhrC-Sq for linux-arm-kernel@lists.infradead.org; Wed, 23 Nov 2022 06:30:12 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5C4B11FB; Tue, 22 Nov 2022 22:30:09 -0800 (PST) Received: from [10.162.43.6] (unknown [10.162.43.6]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2AB543F73B; Tue, 22 Nov 2022 22:30:00 -0800 (PST) Message-ID: Date: Wed, 23 Nov 2022 11:59:58 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH] arm64: booting: Require placement within 48-bit addressable memory Content-Language: en-US To: Ard Biesheuvel , linux-arm-kernel@lists.infradead.org Cc: will@kernel.org, catalin.marinas@arm.com, mark.rutland@arm.com References: <20221122170249.2453853-1-ardb@kernel.org> From: Anshuman Khandual In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221122_223010_090568_1528FC97 X-CRM114-Status: GOOD ( 18.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 11/22/22 22:33, Ard Biesheuvel wrote: > On Tue, 22 Nov 2022 at 18:02, Ard Biesheuvel wrote: >> >> Some configurations (i.e., 64k + LVA/LPA) can tolerate a physical >> placement of the kernel image outside of the 48-bit addressable region, >> but given that the loader has no way of knowing whether or not the image >> in question supports LVA/LPA, it currently has no choice but to place it >> below the 48-bit mark. >> >> Once we add support for LPA2, which allows 52-bit physical and virtual >> addressing when using 4k or 16k pages, but in way that relies on >> increasing the number of paging levels, there will be more variety in >> the configurations that may or may not support this. >> >> So redefine bit #3 in the Image header as 'must be placed within 48-bit >> addressable memory', as this is the current de facto meaning. >> >> Signed-off-by: Ard Biesheuvel >> --- > > Note that this is a v2 addressing prior feedback from Mark. As you had mentioned earlier, currently [64K|52VA|52PA] can boot the vmlinux loaded beyond 48 bits PA. Why should not the kernel header flags be extended right away to support mentioned FEAT_LPA config and also let the kernel write update these extended flags when applicable. Why wait for FEAT_LPA2 ? > >> Documentation/arm64/booting.rst | 5 +++-- >> 1 file changed, 3 insertions(+), 2 deletions(-) >> >> diff --git a/Documentation/arm64/booting.rst b/Documentation/arm64/booting.rst >> index 8c324ad638de2b27..5a764fabfea821f0 100644 >> --- a/Documentation/arm64/booting.rst >> +++ b/Documentation/arm64/booting.rst >> @@ -121,8 +121,9 @@ Header notes: >> to the base of DRAM, since memory below it is not >> accessible via the linear mapping >> 1 >> - 2MB aligned base may be anywhere in physical >> - memory >> + 2MB aligned base such that all image_size bytes >> + counted from the start of the image are within >> + the 48-bit addressable range of physical memory >> Bits 4-63 Reserved. >> ============= =============================================================== >> >> -- >> 2.35.1 >> > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel