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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 960E3C433EF for ; Wed, 1 Jun 2022 09:00:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351009AbiFAJAq (ORCPT ); Wed, 1 Jun 2022 05:00:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351151AbiFAJAa (ORCPT ); Wed, 1 Jun 2022 05:00:30 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 97F175FF2F for ; Wed, 1 Jun 2022 02:00:29 -0700 (PDT) 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-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-633-_UUTAGXbNdOvBnu29rQLKA-1; Wed, 01 Jun 2022 05:00:26 -0400 X-MC-Unique: _UUTAGXbNdOvBnu29rQLKA-1 Received: by mail-wm1-f72.google.com with SMTP id c187-20020a1c35c4000000b003970013833aso616185wma.1 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=me4ojuXstbE6TsAC8eHGstpN7K2aar3IbJRk7n8YkS2mMFTGwBMEvhgGEjfNC70qGY L/LkHaiC9rI8whvwy9OiwtDZTbdsgr+9/lxkkJXhmqSgemYyyU8JvMjTSgAnBlZLOG4R 3oAWCJRuDVWlSZlbW2Jx0cd2YB7aife73djALOIpWPcCM/mY0SaIV61bQKeilqHawO9Z vLfrWe1O2yR2HxHJj8OIeIuhAQ/Ky1ilAUfIRuFiWQfDsv+qHDPtzULbPmiiI2ccHdmT ahWnCjeOEwGVYPDJjoUJT0cIPKpiyJE7ZJa1z4WhaH1WVaAFPwdaoO7t5HW8cUlyi7eT IpIg== X-Gm-Message-State: AOAM532DUQmgj5W+J1w1sAyU8ukbIVBe0a99Z62CcJy37/+TvGbJfk4i +Mk8lS1ucvLxVM6J3kFNziPaJu2z2MeMDF6bts1wCRwjY96f0q9s582nfneomVSZIIeaF/EapSx RkQoQrQODuD+pHQsgPygguYUk X-Received: by 2002:a5d:6d0a:0:b0:20f:ecc9:2819 with SMTP id e10-20020a5d6d0a000000b0020fecc92819mr34366327wrq.666.1654074025593; 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 Content-Language: en-US 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> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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