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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F5B7C433EF for ; Wed, 1 Jun 2022 09:00:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A4D6A6B0095; Wed, 1 Jun 2022 05:00:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9F8A66B0096; Wed, 1 Jun 2022 05:00:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 89A516B0098; Wed, 1 Jun 2022 05:00:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 7CB9B6B0095 for ; Wed, 1 Jun 2022 05:00:30 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 4A7EA60666 for ; Wed, 1 Jun 2022 09:00:30 +0000 (UTC) X-FDA: 79529071020.14.C6C03E5 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf29.hostedemail.com (Postfix) with ESMTP id E6E6012005A for ; Wed, 1 Jun 2022 09:00:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654074028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=47e42rnIYaU6sJqvrI7HnnRd2dfzcghd2QGgfknq5Gw=; b=B4GOV2DVy+ciGbiEMpmzQvXARh+SkwiEXKF6Ydh8qPq0k0f7/ecGcFzI7uzS4fEItMxP++ nF59PnZ2sJsXxDaeUzde4iHE0df2W1Zt9gLMsC9bCdJ3oQ35UkrTZ7ANRx/SQCSML2jtRG rkMXdhlcF0zVYqx/1TXhmDljKdxrDH8= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-183-EYd0ogFLNh-a0mJs7foNQw-1; Wed, 01 Jun 2022 05:00:26 -0400 X-MC-Unique: EYd0ogFLNh-a0mJs7foNQw-1 Received: by mail-wm1-f69.google.com with SMTP id bg7-20020a05600c3c8700b0039468585269so612965wmb.3 for ; Wed, 01 Jun 2022 02:00:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:to:cc:references:from:organization:subject :in-reply-to:content-transfer-encoding; bh=47e42rnIYaU6sJqvrI7HnnRd2dfzcghd2QGgfknq5Gw=; b=PaEywNHh0oU5VqN4QcfoqSB25Y/AKDDrac+7Wn+U6NWKWfu7cHmqVFBPz5dl8BZTVH NFIKJxgDolcIByNbu1BLVH9PZKpzSU44YlcPRqerNf3PZNpSxUyaVJ8wT9uk6tmjSW0y yGfm7Apwy1RiM7fDYpuYb3THKJKh9DoXSiyqQ1cVemCL4DnWi7wczpm4Gv3QWLI6bvKQ bw1/3/rIct2EHu3RujZRd5vGzsgE72LXZzpPPUyhUlwivB8tzLHdfbIBuRdmPRzmpMu/ GfZIDAQdAbzdk+shlPA1UpeeFOPvou7e311mlncqSZyaphgH0z0iX0oY9vGuxj0voHVn 20sQ== X-Gm-Message-State: AOAM530xbbTIr+MGMbhWsvTQuV3Jf3juNtnU6QbOHcyxAjY2ohkKJPAM 6lTS+coKcyXUsmOoBRMzZEygbHwc1XI2jGUhU+/+fX4B8vCb8LKdr/sSRfAQo+sUDk3YaViA6Xi MbPTWl+7K4WY= X-Received: by 2002:a5d:6d0a:0:b0:20f:ecc9:2819 with SMTP id e10-20020a5d6d0a000000b0020fecc92819mr34366328wrq.666.1654074025600; Wed, 01 Jun 2022 02:00:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJFJMguj1HytJIpfb+YPwV4xImpt7pcmIEp7Y330tAofv7dZyg6rYBGjWbJBVTyfbKbEYsog== X-Received: by 2002:a5d:6d0a:0:b0:20f:ecc9:2819 with SMTP id e10-20020a5d6d0a000000b0020fecc92819mr34366292wrq.666.1654074025277; Wed, 01 Jun 2022 02:00:25 -0700 (PDT) Received: from ?IPV6:2003:cb:c705:2600:951d:63df:c091:3b45? (p200300cbc7052600951d63dfc0913b45.dip0.t-ipconnect.de. [2003:cb:c705:2600:951d:63df:c091:3b45]) by smtp.gmail.com with ESMTPSA id h1-20020a056000000100b0020c5253d8casm992951wrx.22.2022.06.01.02.00.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Jun 2022 02:00:24 -0700 (PDT) Message-ID: Date: Wed, 1 Jun 2022 11:00:23 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 To: "Kirill A. Shutemov" , Borislav Petkov , Andy Lutomirski , Sean Christopherson , Andrew Morton , Joerg Roedel , Ard Biesheuvel Cc: Andi Kleen , Kuppuswamy Sathyanarayanan , David Rientjes , Vlastimil Babka , Tom Lendacky , Thomas Gleixner , Peter Zijlstra , Paolo Bonzini , Ingo Molnar , Varad Gautam , Dario Faggioli , Dave Hansen , Mike Rapoport , marcelo.cerri@canonical.com, tim.gardner@canonical.com, khalid.elmously@canonical.com, philip.cox@canonical.com, x86@kernel.org, linux-mm@kvack.org, linux-coco@lists.linux.dev, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220517153444.11195-1-kirill.shutemov@linux.intel.com> <20220517153444.11195-4-kirill.shutemov@linux.intel.com> From: David Hildenbrand Organization: Red Hat Subject: Re: [PATCHv6 03/15] efi/x86: Get full memory map in allocate_e820() In-Reply-To: <20220517153444.11195-4-kirill.shutemov@linux.intel.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: E6E6012005A X-Stat-Signature: 4rd497oxd7az9xzcz1zkaewshput45nn Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=B4GOV2DV; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf29.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.129.124) smtp.mailfrom=david@redhat.com X-HE-Tag: 1654074015-324778 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 17.05.22 17:34, Kirill A. Shutemov wrote: > Currently allocate_e820() only interested in the size of map and size of > memory descriptor to determine how many e820 entries the kernel needs. > > UEFI Specification version 2.9 introduces a new memory type -- > unaccepted memory. To track unaccepted memory kernel needs to allocate > a bitmap. The size of the bitmap is dependent on the maximum physical > address present in the system. A full memory map is required to find > the maximum address. > > Modify allocate_e820() to get a full memory map. Usually we use max_pfn, if we want to know the maximum pfn that's present in the system (well, IIRC, excluding hotunplug). How exactly will this (different?) maximum from UEFI for the bitmap interact with max_pfn = e820__end_of_ram_pfn(); from e820 in existing code ? -- Thanks, David / dhildenb