From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AC03A606A31A for ; Tue, 1 Dec 2026 10:12:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=JykTgRVg Received: by kanga.kvack.org (Postfix) id C344D6B05B2; Tue, 1 Dec 2026 05:12:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BE5426B05B7; Tue, 1 Dec 2026 05:12:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AD48B6B05BA; Tue, 1 Dec 2026 05:12:30 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 7C42B6B05B2 for ; Tue, 1 Dec 2026 05:12:30 -0500 (EST) Received: from smtpin29.hostedemail.com (lb01a-stub [10.200.18.249]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 12B3C140DBF for ; Tue, 1 Dec 2026 10:12:30 +0000 (UTC) X-FDA: 85494999660.29.8BCBF0D Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by imf30.hostedemail.com (Postfix) with ESMTP id ED9DD8000D for ; Tue, 1 Dec 2026 10:12:27 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20260515 header.b=JykTgRVg; spf=pass (imf30.hostedemail.com: domain of ardb@kernel.org designates 172.234.252.31 as permitted sender) smtp.mailfrom=ardb@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; d=hostedemail.com; s=arc-20220608; cv=none; t=1796119948; b=H+sN8ISh5Imihe7Sw07EX7/iSIQ/dAP6UqI4cXVkfVt/N+mo43OQDMN6k9IklBNP2rNMVc q55qKRQBnVPhc/lMAoQyNvVocGoB09QtC33qSKjCy5QLrmxfLGLcn5kmicqBw70qeTw8Fx kGWmAmq2j2lf0IBtPqD0Z5u5J49mw5w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1796119948; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=+3qVd8Ui+waHhlJtAxrTO0C0JdPIV2K/bXcSas3bbyg=; b=ZZD/5VvgFvPEVBJaTTn99shx2yNjnGyF4dy77KrpMQrtPsM8lL5Cx4p4xCy6FOVu9ntwb8 wqyxQBUFky9vtWE12c/la7tD+tBJG5vtnaz4Gv8jJLM9aEenNbokOZr2x3FqxfoVUvpQGz FelAl+GScAoBoySt3kILnbm/9fTPPik= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20260515 header.b=JykTgRVg; spf=pass (imf30.hostedemail.com: domain of ardb@kernel.org designates 172.234.252.31 as permitted sender) smtp.mailfrom=ardb@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 17CB141FB0; Tue, 1 Dec 2026 10:12:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60EA61F00899; Tue, 1 Dec 2026 10:12:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796119946; bh=+3qVd8Ui+waHhlJtAxrTO0C0JdPIV2K/bXcSas3bbyg=; h=Date:From:To:Cc:In-Reply-To:References:Subject; b=JykTgRVgDTG9Li7qJBVrhn+twaqbhqx2bMyKnzbmy5lBUbfPsCgYYTC/7fsiRlue3 yz0Yamx+hbG03V7yWiAj9zsL2u0EzDK6J78zOk/I6guOIfhcxYaP4XUW1WKAByLb/e oDhfGSU7phYP3OiSWurO8FWW44jrihZaUe+OwFj8zmgFD4i0448wwOl9IV1knFwMQN EVutFDi5Xi+ApsxjYrvOib2sJj8vK6dcQXf2vVW/2VKUpa0kGOB7d0Cbq5WJhC/Cgo fCarzrMn48FyMQUL5OzYG+Jy58e4CSsNfQ8wLK7s+l0GPobFGLGD8haBCKFEMEd+ac 7a5aHyU0X2gGg== Received: from ams-compute-02.internal (ams-compute-02.internal [10.64.2.62]) by mailfauth.ams.internal (Postfix) with ESMTP id 89CC11980047; Tue, 1 Dec 2026 05:12:23 -0500 (EST) Received: from ams-imap-11 ([10.64.2.31]) by ams-compute-02.internal (MEProxy); Tue, 01 Dec 2026 05:12:23 -0500 X-ME-Sender: X-ME-Proxy-Cause: dmFkZTFA8aLbbg/dueBudmzY3vFhyBs3VShc/xMsiCZxtZ9dwKr6NlQ5eKjTT4jrb1OGsK cLCia2PPvyzaxO3gLUDm2LfFwtyzqd+2h+aqQfyJT3yaIcaKPFIhbpNDGlPm4RttmL4ZbU 2FJADq7yeBOLwptKzrmTAJksxKj1Tcjp3xRvcbBmCYw2rMcHf+3v4TdQEBOBEM85yyyYmb LF7X+i+htufc4sOvyORfsH8ZslCZqzPZUeZuR1vqsk5coRHwaM4m2NRi1yuiRWiUEmZ6v8 gdSh+0+wOHFJl+rkRmWRbaM3l22pRmPnBUJ2/TceffLbGw8G85vmafao6z5IX02YoUvbpK SkA+8T9NAzzOJ3jsHIdez7cegEk6sONe+3OV4/GWLLjwqZyqh5ZqRaYXYey/ix7EGrd1JC 1W51Fjw2NBurM0n9N5CeiIU8B/rt8ij9wZbtQN+k0YSMgpyqOrFNwaIj3tMZllOk3v1Ls6 i8N1VLSrJOlESLms8Sr4dqKOMoLmeDci60gQz+mEbERRI3hJlo0XE4Uz/c+1QIiBgSesPV BGT+6P/GwoAo7mRv2MsXRJeD5ZbuiObdFUtJAeNBmQZqpQOvr7qA9833hZnF/8qnCA5aMn QX82loMddBQNgdYxQrqM00nznFd2K1EAL9wyst5MHafALzbzx9uv1FIiHISA X-ME-Proxy: Feedback-ID: ice86485a:Fastmail Received: by mailuser.ams.internal (Postfix, from userid 501) id 6BD0DF80096; Tue, 1 Dec 2026 05:12:19 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface X-Archived-By: MIME-Version: 1.0 Date: Tue, 01 Dec 2026 11:11:49 +0100 From: "Ard Biesheuvel" To: "Mike Rapoport" , "Pankaj Gupta" Cc: "Thomas Gleixner" , "Ingo Molnar" , "Borislav Petkov" , "Dave Hansen" , x86@kernel.org, "Jonathan Corbet" , "Shuah Khan" , "Randy Dunlap" , linux-doc@vger.kernel.org, "Arnd Bergmann" , "Dapeng Mi" , "Marco Elver" , "H . Peter Anvin" , "Tom Lendacky" , "Kiryl Shutsemau (Meta)" , "Ilias Apalodimas" , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-efi@vger.kernel.org, Pankaj.gupta.linux@gmail.com, "Ethan Nelson-Moore" , "Karl Mehltretter" Message-Id: <57eebbdb-6ef2-4bc1-94af-20d36eca005e@app.fastmail.com> In-Reply-To: References: <20261125120301.223907-1-pankaj.gupta@amd.com> Subject: Re: [PATCH] Documentation: kernel-parameters: memmap= and mem= in confidential guests Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Rspam-User: X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: ED9DD8000D X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Stat-Signature: w1ago7m19tnj1j35817ud9z1wkpanqpj X-HE-Tag: 1796119947-448422 X-HE-Meta: U2FsdGVkX1+xZIrX+xG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Ad79p2YQh4jQQ9vPGeJGmqxrB5p/42tgA3BG+yJABXwH5v3jqkmGMe9V/gbfLcJNGHKeCoDl9Bi+v/ztYvQBl7qswrupin0iRqFA8pHG4hOsY4w97DWwmkrBf8FZbpssp6GViWa6byxB5xkZpW2HyBhtTWTrvGVHxfOWcdgWfXXOGfIGxrxkQQhIrdBDWHjIZSNC67fEEMYAmg5OD/Gf2kU9Ek3UkQY+x5HY8WOPsUqGqUwdK7XxDyZHXyYFseAH1sOukcCG0xPs5G2eP0Bz9CV8ytWpwgyzZYJwlVKdIZAKhbuFyfDLZ5JxZGhEhbgj0UNWx2uqn3+xIs42tH5+g4SSXZthabdFL5MTQJyZMFBFLHfseGQqwSxj3foPIWgkJQFf6Uoe10qxFvX9fahf8kfdlL3o7N5TnOiDu/j/dZv53FbryHWJAqnpVU+Q3T7IQ7/WE0Dzt8Xu/r Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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 >> --- >> 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?