[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3a361a1d-0e14-8884-c5bb-90aeb87e38ef@intel.com>
Date: Tue, 11 Jan 2022 11:10:40 -0800
From: Dave Hansen <dave.hansen@...el.com>
To: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Borislav Petkov <bp@...en8.de>,
Andy Lutomirski <luto@...nel.org>,
Sean Christopherson <seanjc@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Joerg Roedel <jroedel@...e.de>,
Ard Biesheuvel <ardb@...nel.org>
Cc: Andi Kleen <ak@...ux.intel.com>,
Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@...ux.intel.com>,
David Rientjes <rientjes@...gle.com>,
Vlastimil Babka <vbabka@...e.cz>,
Tom Lendacky <thomas.lendacky@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Paolo Bonzini <pbonzini@...hat.com>,
Ingo Molnar <mingo@...hat.com>,
Varad Gautam <varad.gautam@...e.com>,
Dario Faggioli <dfaggioli@...e.com>, x86@...nel.org,
linux-mm@...ck.org, linux-coco@...ts.linux.dev,
linux-efi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCHv2 5/7] x86/mm: Reserve unaccepted memory bitmap
On 1/11/22 03:33, Kirill A. Shutemov wrote:
> Unaccepted memory bitmap is allocated during decompression stage and
> handed over to main kernel image via boot_params. The bitmap is used to
> track if memory has been accepted.
>
> Reserve unaccepted memory bitmap has to prevent reallocating memory for
> other means.
I'm having a hard time parsing that changelog, especially the second
paragraph. Could you give it another shot?
> + /* Mark unaccepted memory bitmap reserved */
> + if (boot_params.unaccepted_memory) {
> + unsigned long size;
> +
> + /* One bit per 2MB */
> + size = DIV_ROUND_UP(e820__end_of_ram_pfn() * PAGE_SIZE,
> + PMD_SIZE * BITS_PER_BYTE);
> + memblock_reserve(boot_params.unaccepted_memory, size);
> + }
Is it OK that the size of the bitmap is inferred from
e820__end_of_ram_pfn()? Is this OK in the presence of mem= and other
things that muck with the e820?
Powered by blists - more mailing lists