From: Xishi Qiu <qiuxishi@huawei.com>
To: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
"H. Peter Anvin" <hpa@zytor.com>
Cc: yeyunfeng <yeyunfeng@huawei.com>, Wenan Mao <maowenan@huawei.com>,
Linux MM <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] should BIOS change the efi type when we set CONFIG_X86_RESERVE_LOW ?
Date: Mon, 23 Apr 2018 18:17:58 +0800 [thread overview]
Message-ID: <5ADDB2D6.3040703@huawei.com> (raw)
In-Reply-To: <5ACEBB47.3060300@huawei.com>
On 2018/4/12 9:49, Xishi Qiu wrote:
> Hi, I find CONFIG_X86_RESERVE_LOW=64 in my system, so trim_low_memory_range()
> will reserve low 64kb memory. But efi_free_boot_services() will free it to
> buddy system again later because BIOS set the type to EFI_BOOT_SERVICES_CODE.
>
> Here is the log:
> ...
> efi: mem03: type=3, attr=0xf, range=[0x000000000000e000-0x0000000000010000) (0MB
> ...
>
>
When call memblock_is_region_reserved(), it will set md->num_pages = 0 if the
memblock region is reserved. But trim_low_memory_range() reserve the region
after efi, so this breaks the logic, and efi_free_boot_services() will free
the pages(efi code/data). That means trim_low_memory_range() has not reserve
the low memory range.
...
efi_reserve_boot_services()
...
trim_low_memory_range()
...
efi_free_boot_services()
...
Shall we move trim_low_memory_range() before efi_reserve_boot_services()?
Thanks,
Xishi Qiu
> .
>
prev parent reply other threads:[~2018-04-23 10:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-12 1:49 Xishi Qiu
2018-04-23 10:17 ` Xishi Qiu [this message]
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=5ADDB2D6.3040703@huawei.com \
--to=qiuxishi@huawei.com \
--cc=ard.biesheuvel@linaro.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=maowenan@huawei.com \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=yeyunfeng@huawei.com \
/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