From: Kairui Song <kasong@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Thomas Lendacky <Thomas.Lendacky@amd.com>,
Baoquan He <bhe@redhat.com>, Lianbo Jiang <lijiang@redhat.com>,
Dave Young <dyoung@redhat.com>,
x86@kernel.org,
"kexec@lists.infradead.org" <kexec@lists.infradead.org>,
Kairui Song <kasong@redhat.com>
Subject: [PATCH v3 0/2] x86/kdump: Reserve extra memory when SME or SEV is active
Date: Tue, 10 Sep 2019 23:13:39 +0800 [thread overview]
Message-ID: <20190910151341.14986-1-kasong@redhat.com> (raw)
This series let kernel reserve extra memory for kdump when SME or SEV is
active.
When SME or SEV is active, SWIOTLB will be always be force enabled, and
this is also true for kdump kernel. As a result kdump kernel will
run out of already scarce pre-reserved memory easily.
So when SME/SEV is active, reserve extra memory for SWIOTLB to ensure
kdump kernel have enough memory, except when "crashkernel=size[KMG],high"
is specified or any offset is used. With high reservation an extra low
memory region will always be reserved and that is enough for SWIOTLB.
With offset format, user should be fully aware of any possible kdump
kernel memory requirement and have to organize the memory usage carefully.
Patch 1/2 simply split some code out of the reserve_crashkernel, prepare
for the change of next patch.
Patch 2/2 will let crashkernel reserve extra memory when SME or SEV is
active, and explains more details and history about why this change is
introduced.
Update from V2:
- Refactor and split some function out of reserve_crashkernel to make
it cleaner, as suggested by Borislav Petkov
- Split into 2 patches
Update from V1:
- Use mem_encrypt_active() instead of "sme_active() || sev_active()"
- Don't reserve extra memory when ",high" or "@offset" is used, and
don't print redundant message.
- Fix coding style problem
Kairui Song (2):
x86/kdump: Split some code out of reserve_crashkernel
x86/kdump: Reserve extra memory when SME or SEV is active
arch/x86/kernel/setup.c | 106 ++++++++++++++++++++++++++++------------
1 file changed, 74 insertions(+), 32 deletions(-)
--
2.21.0
next reply other threads:[~2019-09-10 15:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-10 15:13 Kairui Song [this message]
2019-09-10 15:13 ` [PATCH v3 1/2] x86/kdump: Split some code out of reserve_crashkernel Kairui Song
2019-09-10 15:13 ` [PATCH v3 2/2] x86/kdump: Reserve extra memory when SME or SEV is active Kairui Song
2019-09-11 5:56 ` Ingo Molnar
[not found] ` <CACPcB9cEE5eYWixkUvMeLVdRC5qhrru9PbjbLLxP3k1jsbRanQ@mail.gmail.com>
2019-09-18 7:55 ` [PATCH v3 0/2] " Dave Young
2019-09-18 10:17 ` Kairui Song
2019-09-25 10:36 ` [PATCH v3 2/2] " Kairui Song
2019-09-27 5:42 ` Dave Young
2019-09-27 7:52 ` Kairui Song
2019-10-12 9:24 ` Kairui Song
2019-10-14 11:05 ` Dave Young
2019-10-14 11:11 ` Dave Young
2019-10-15 2:18 ` Dave Young
2019-10-15 17:18 ` Kairui Song
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=20190910151341.14986-1-kasong@redhat.com \
--to=kasong@redhat.com \
--cc=Thomas.Lendacky@amd.com \
--cc=bhe@redhat.com \
--cc=bp@alien8.de \
--cc=dyoung@redhat.com \
--cc=kexec@lists.infradead.org \
--cc=lijiang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--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
all inboxes | Powered by JetHome®