[PATCH v3] Documentation: kernel-parameters: memmap= and mem= in confidential guests

From: Pankaj Gupta

Date: Fri Dec 04 2026 - 05:54:00 EST


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 the current
design, as a unit cannot be half accepted. So document that these
options can and will break things.

Link: https://lore.kernel.org/all/96be8f5a-8f65-48ff-8263-1d5d5f706354@xxxxxxxxx/
Suggested-by: Dave Hansen <dave.hansen@xxxxxxxxx>
Suggested-by: Ard Biesheuvel <ardb@xxxxxxxxxx>
Signed-off-by: Pankaj Gupta <pankaj.gupta@xxxxxxx>
---
v3:
- Say only that the options can and will break things (Dave).
- Move the mem= note out of the x86 part (Mike).
- Mention that the other memmap= variants are covered too (Mike).
v2: https://lore.kernel.org/all/20261203113547.250526-1-pankaj.gupta@xxxxxxx/
v1: https://lore.kernel.org/all/20261125120301.223907-1-pankaj.gupta@xxxxxxx/

Documentation/admin-guide/kernel-parameters.txt | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index dce9b8f3ae98..a8617544b225 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -3915,6 +3915,8 @@ Kernel parameters
the hypervisor, then assigned to KVM guests.
4 to limit the memory available for kdump kernel.

+ This option can and will break things.
+
[ARC,MICROBLAZE] - the limit applies only to low memory,
high memory is not affected.

@@ -3971,6 +3973,9 @@ Kernel parameters
Example:
memmap=100M@2G,100M#3G,1G!1024G

+ This option and the other memmap= variants can and will
+ break things.
+
memmap=nn[KMG]#ss[KMG]
[KNL,ACPI,EARLY] Mark specific memory as ACPI data.
Region of memory to be marked is from ss to ss+nn.

base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244
--
2.34.1