Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5865443ioo; Wed, 1 Jun 2022 14:26:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCH41ymUWwm48ilb702rB0mPDnbp/eVdJQUK6DJahs6zQJyZ3lOgaA0CJd2t0R+NZOxwN5 X-Received: by 2002:a63:dc08:0:b0:3fa:d469:e3a9 with SMTP id s8-20020a63dc08000000b003fad469e3a9mr1195647pgg.164.1654118779852; Wed, 01 Jun 2022 14:26:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654118779; cv=none; d=google.com; s=arc-20160816; b=FGa4+aFwv7xVTXQmE76HBKQaKgNGiNTdoLB2N7RnvBiAs/dcV8/H8PQj/0uCrbPGss lvGe1Zi3m5iJ0CzL3T8bh8ANviDSAzStL15D0oAPKjJ2UjxzYS8L2mzKSlmv25a0p/Zm V+vq4SL9NX8yBTJPWbzU+ThM9AKKbQ8LfPHTcTA10sJguRKWDVa++WsWoEQWqMWqCoAT JVl9cucAUBP0rRwZqcbnuCChSBQBLP1xX/SD/LwD+nAYsR/XzABJbVhxGlO1TcoqkKg3 zQ2csUJgzA42flD1FHAgdSUGMJWirKfdX0jRT4U2JIjOBUmM7lfWUCpfTYCJ1Q/GqWIF lwag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :organization:from:references:cc:to:content-language:user-agent :mime-version:date:message-id:dkim-signature; bh=47e42rnIYaU6sJqvrI7HnnRd2dfzcghd2QGgfknq5Gw=; b=LkFCVgMW7au13bxcs/N2aaxVYkbezjczZSc8l20aRt3gR/uPtQFLrX6LUZqsiUeYhG qnQJYu5jpQbukc6qN1iDn5BNueeLtyZ+XoDBFOvNEgUVvI4bxq1A+iWXTV3tIgIcymCl vJ+9zDSgSSbD00GyvTD27+peZjeJmSo+9ofS/5gfIkG0VE2g/9WYjWAWRHS7lQUkYXGk gkUyQV9QUK5dDtqbjVrcY4AtAwDCxrNANr0lYtZIXFZlwg1wf/ZFRnH8KbBR1GdEPbuC IUGB9evZX235ezfmoJi+5l+z+4LeAk1HBqirnNny9AlelWDTFtCx82HUkGVhcp7Y/3lR dMvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=B4GOV2DV; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id k16-20020a170902ce1000b001619f0045f3si3701248plg.574.2022.06.01.14.26.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 14:26:19 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=B4GOV2DV; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3B452245FA2; Wed, 1 Jun 2022 13:16:36 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351003AbiFAJAp (ORCPT + 99 others); Wed, 1 Jun 2022 05:00:45 -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-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 X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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