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=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 7DE0AC4363D for ; Tue, 22 Sep 2020 15:19:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1A8F323A1E for ; Tue, 22 Sep 2020 15:19:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=pobox.com header.i=@pobox.com header.b="r5qWCmld"; dkim=pass (1024-bit key) header.d=fluxnic.net header.i=@fluxnic.net header.b="K30uM0n5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726625AbgIVPTO (ORCPT ); Tue, 22 Sep 2020 11:19:14 -0400 Received: from pb-smtp2.pobox.com ([64.147.108.71]:62569 "EHLO pb-smtp2.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726566AbgIVPTO (ORCPT ); Tue, 22 Sep 2020 11:19:14 -0400 X-Greylist: delayed 381 seconds by postgrey-1.27 at vger.kernel.org; Tue, 22 Sep 2020 11:19:12 EDT Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 9D5CF77977; Tue, 22 Sep 2020 11:12:50 -0400 (EDT) (envelope-from nico@fluxnic.net) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=date:from:to :cc:subject:in-reply-to:message-id:references:mime-version :content-type; s=sasl; bh=4TyobxKGfDt8ZpPbXCwuotQH6lU=; b=r5qWCm ldMPR34PTngVZCEEvjpvVPi2dyoMEdHdtgMHTXY7d1fMFNVu1UnUgvXqzCHZJptY VQauPlPiu7Kp/gaaDbuCnvUwKTd6BAzupGT05JMZWWH+BUrAB6unr+bpX261GfQ0 dm7HlPbJrD0b+t1nQZpZvtnGSPV8vWlLoYqFw= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 8A1BA77976; Tue, 22 Sep 2020 11:12:50 -0400 (EDT) (envelope-from nico@fluxnic.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=fluxnic.net; h=date:from:to:cc:subject:in-reply-to:message-id:references:mime-version:content-type; s=2016-12.pbsmtp; bh=qZ2Fq0EYgc9jw3s60wo/tDN9sDaGbjo+Rv/59aZNO98=; b=K30uM0n53afjxv2y5nNfLbdV6JQ9jQFG7sMf/Efbb8lJ1KzmgRGuCFUK8KYGvAx2wIB4NLkhSTFGN5mlF62RqPoM6hwFGq6y6ZzABHaoFDWN5ba1ZV3NvU1lHp7jOBckPQTaf/ShRpLp+NfM/9kS66lLTBhc4Jg0xmHFEJFKbyU= Received: from yoda.home (unknown [24.203.50.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id F280977975; Tue, 22 Sep 2020 11:12:49 -0400 (EDT) (envelope-from nico@fluxnic.net) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTPSA id 11C762DA00F6; Tue, 22 Sep 2020 11:12:49 -0400 (EDT) Date: Tue, 22 Sep 2020 11:12:48 -0400 (EDT) From: Nicolas Pitre To: Ard Biesheuvel cc: Linus Walleij , Linux ARM , linux-efi , Zhen Lei , Russell King Subject: Re: [PATCH v2 10/10] ARM: p2v: reduce p2v alignment requirement to 2 MiB In-Reply-To: Message-ID: References: <20200921154117.757-1-ardb@kernel.org> <20200921154117.757-11-ardb@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Pobox-Relay-ID: 14380E12-FCE6-11EA-ACCC-2F5D23BA3BAF-78420484!pb-smtp2.pobox.com Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org On Tue, 22 Sep 2020, Ard Biesheuvel wrote: > By changing the patchable sequences and the patching logic to carry > more bits of offset, we can improve this: 11 bits gives us 4 GiB >> 11 > == 2 MiB granularity, and so you never waste more than that amount by > rounding up the physical start of DRAM to the next multiple of 2 MiB. > (Note that 2 MiB granularity guarantees that the linear mapping can be > created efficiently, whereas less than 2 MiB may result in the linear > mapping needing another level of page tables) That is IMHO the top argument for limiting it to 2 MiB. It would be worth making this explicit in the commit log. Nicolas