From: "Ard Biesheuvel" <ardb@kernel.org>
To: "Mike Rapoport" <rppt@kernel.org>, "Pankaj Gupta" <pankaj.gupta@amd.com>
Cc: "Thomas Gleixner" <tglx@kernel.org>,
"Ingo Molnar" <mingo@redhat.com>,
"Borislav Petkov" <bp@alien8.de>,
"Dave Hansen" <dave.hansen@linux.intel.com>,
x86@kernel.org, "Jonathan Corbet" <corbet@lwn.net>,
"Shuah Khan" <skhan@linuxfoundation.org>,
"Randy Dunlap" <rdunlap@infradead.org>,
linux-doc@vger.kernel.org, "Arnd Bergmann" <arnd@arndb.de>,
"Dapeng Mi" <dapeng1.mi@linux.intel.com>,
"Marco Elver" <elver@google.com>,
"H . Peter Anvin" <hpa@zytor.com>,
"Tom Lendacky" <thomas.lendacky@amd.com>,
"Kiryl Shutsemau (Meta)" <kas@kernel.org>,
"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-efi@vger.kernel.org, Pankaj.gupta.linux@gmail.com,
"Ethan Nelson-Moore" <enelsonmoore@gmail.com>,
"Karl Mehltretter" <kmehltretter@gmail.com>
Subject: Re: [PATCH] Documentation: kernel-parameters: memmap= and mem= in confidential guests
Date: Tue, 01 Dec 2026 11:11:49 +0100 [thread overview]
Message-ID: <57eebbdb-6ef2-4bc1-94af-20d36eca005e@app.fastmail.com> (raw)
In-Reply-To: <aw6cebqic5fw57Uv@kernel.org>
On Tue, 1 Dec 2026, at 11:07, Mike Rapoport wrote:
> On Wed, Nov 25, 2026 at 06:03:01AM -0600, Pankaj Gupta wrote:
>> In a confidential guest (SEV-SNP, TDX) the EFI stub builds the unaccepted
>> memory bitmap before the command line is parsed. memmap= and mem= edit
>> the E820 table only afterwards, so the two no longer match.
>>
>> accept_memory() accepts whole units (2 MiB on x86). On SEV-SNP this can
>> touch a memmap= hole, which is not mapped, and crashes the guest early
>> in boot. TDX accepts by physical address and does not fault.
>>
>> Making the bitmap follow these options is not feasible in current design,
>> as a unit cannot be half accepted. These options are debugging tools,
>> so document that they are not supported in confidential guests that use
>> unaccepted memory.
>>
>> Link: https://lore.kernel.org/all/96be8f5a-8f65-48ff-8263-1d5d5f706354@intel.com/
>> Signed-off-by: Pankaj Gupta <pankaj.gupta@amd.com>
>> ---
>> Documentation/admin-guide/kernel-parameters.txt | 12 ++++++++++++
>> 1 file changed, 12 insertions(+)
>>
>> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
>> index dce9b8f3ae98..d0e9a2c7dddb 100644
>> --- a/Documentation/admin-guide/kernel-parameters.txt
>> +++ b/Documentation/admin-guide/kernel-parameters.txt
>> @@ -3930,6 +3930,12 @@ Kernel parameters
>> in above case 3, memory may need be hot added after boot
>> if system memory of hypervisor is not sufficient.
>>
>> + [X86] Not supported in confidential guests (SEV-SNP,
>> + TDX) that use unaccepted memory. The unaccepted memory
>
> Pardon my ignorance, are there confidential guests that don't use
> unaccepted memory?
>
>> + bitmap is built before the command line is parsed and
>> + does not follow mem=, so memory that is no longer in
>> + the memory map may still be accepted.
>
> Do we need the details about the unaccepted bitmap in the user facing docs?
>
I don't think so.
Could we just document that things like mem= and memmap= are best effort and
may break the mutual consistency of the various memory descriptions provided
by the platform firmware?
next prev parent reply other threads:[~2026-12-01 10:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 12:03 [PATCH] Documentation: kernel-parameters: memmap= and mem= in confidential guests Pankaj Gupta
2026-12-01 10:07 ` Mike Rapoport
2026-12-01 10:11 ` Ard Biesheuvel [this message]
2026-12-01 10:31 ` Gupta, Pankaj
2026-12-01 10:33 ` Gupta, Pankaj
2026-12-01 15:16 ` Dave Hansen
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=57eebbdb-6ef2-4bc1-94af-20d36eca005e@app.fastmail.com \
--to=ardb@kernel.org \
--cc=Pankaj.gupta.linux@gmail.com \
--cc=arnd@arndb.de \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=dapeng1.mi@linux.intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=elver@google.com \
--cc=enelsonmoore@gmail.com \
--cc=hpa@zytor.com \
--cc=ilias.apalodimas@linaro.org \
--cc=kas@kernel.org \
--cc=kmehltretter@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@redhat.com \
--cc=pankaj.gupta@amd.com \
--cc=rdunlap@infradead.org \
--cc=rppt@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=tglx@kernel.org \
--cc=thomas.lendacky@amd.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.