[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190910151341.14986-1-kasong@redhat.com>
Date: Tue, 10 Sep 2019 23:13:39 +0800
From: Kairui Song <kasong@...hat.com>
To: linux-kernel@...r.kernel.org
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Thomas Lendacky <Thomas.Lendacky@....com>,
Baoquan He <bhe@...hat.com>, Lianbo Jiang <lijiang@...hat.com>,
Dave Young <dyoung@...hat.com>, x86@...nel.org,
"kexec@...ts.infradead.org" <kexec@...ts.infradead.org>,
Kairui Song <kasong@...hat.com>
Subject: [PATCH v3 0/2] x86/kdump: Reserve extra memory when SME or SEV is active
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
Powered by blists - more mailing lists