public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Baoquan He <bhe@redhat.com>
To: Mike Rapoport <rppt@kernel.org>
Cc: x86@kernel.org, Andrew Morton <akpm@linux-foundation.org>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Borislav Petkov <bp@alien8.de>,
	David Hildenbrand <david@redhat.com>,
	"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>,
	Mel Gorman <mgorman@suse.de>, Michal Hocko <mhocko@kernel.org>,
	Mike Rapoport <rppt@linux.ibm.com>, Qian Cai <cai@lca.pw>,
	Thomas Gleixner <tglx@linutronix.de>,
	Vlastimil Babka <vbabka@suse.cz>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Borislav Petkov <bp@suse.de>
Subject: Re: [PATCH v3 1/2] x86/setup: consolidate early memory reservations
Date: Wed, 3 Mar 2021 08:39:59 +0800	[thread overview]
Message-ID: <20210303003959.GB2962@MiWiFi-R3L-srv> (raw)
In-Reply-To: <YD5XJrtJDgdmMt42@kernel.org>

On 03/02/21 at 05:17pm, Mike Rapoport wrote:
> On Tue, Mar 02, 2021 at 09:04:09PM +0800, Baoquan He wrote:
...
> > > +static void __init early_reserve_memory(void)
> > > +{
> > > +	/*
> > > +	 * Reserve the memory occupied by the kernel between _text and
> > > +	 * __end_of_kernel_reserve symbols. Any kernel sections after the
> > > +	 * __end_of_kernel_reserve symbol must be explicitly reserved with a
> > > +	 * separate memblock_reserve() or they will be discarded.
> > > +	 */
> > > +	memblock_reserve(__pa_symbol(_text),
> > > +			 (unsigned long)__end_of_kernel_reserve - (unsigned long)_text);
> > > +
> > > +	/*
> > > +	 * Make sure page 0 is always reserved because on systems with
> > > +	 * L1TF its contents can be leaked to user processes.
> > > +	 */
> > > +	memblock_reserve(0, PAGE_SIZE);
> > > +
> > > +	early_reserve_initrd();
> > > +
> > > +	if (efi_enabled(EFI_BOOT))
> > > +		efi_memblock_x86_reserve_range();
> > > +
> > > +	memblock_x86_reserve_range_setup_data();
> > 
> > This patch looks good to me, thanks for the effort.
> > 
> > While at it, wondering if we can rename the above function to
> > memblock_reserve_setup_data() just as its e820 counterpart
> > e820__reserve_setup_data(), adding 'x86' to a function under arch/x86
> > seems redundant.
> 
> I'd rather keep these names for now. First, it's easier to dig to them in the git
> history and second, I'm planning more changes in this area and these names
> are as good as FIXME: to remind what still needs to be checked :)

I see, thanks for explanation.


  reply	other threads:[~2021-03-03 11:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-02 10:04 [PATCH v3 0/2] x86/setup: consolidate early memory reservations Mike Rapoport
2021-03-02 10:04 ` [PATCH v3 1/2] " Mike Rapoport
2021-03-02 13:04   ` Baoquan He
2021-03-02 15:17     ` Mike Rapoport
2021-03-03  0:39       ` Baoquan He [this message]
2021-03-02 10:04 ` [PATCH v3 2/2] x86/setup: merge several reservations of start of the memory Mike Rapoport
2021-03-23 18:19   ` [tip: x86/boot] x86/setup: Merge several reservations of start of memory tip-bot2 for Mike Rapoport
2021-03-10 17:52 ` [PATCH v3 0/2] x86/setup: consolidate early memory reservations Mike Rapoport
2021-03-10 17:59   ` David Hildenbrand
2021-03-18  6:53   ` Mike Rapoport

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210303003959.GB2962@MiWiFi-R3L-srv \
    --to=bhe@redhat.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=bp@suse.de \
    --cc=cai@lca.pw \
    --cc=david@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@kernel.org \
    --cc=mingo@redhat.com \
    --cc=rppt@kernel.org \
    --cc=rppt@linux.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=vbabka@suse.cz \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox