From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796119947; b=a7Blsltw6hdfuAAoor8IZ51EPesXFgL0g35hu1DKw4zzqfcl+0gnlFS7qmnCfG4KcNId ysf+Noy+PwAX6RMpSu5Nl1HZxJp5sqvbmcDTKwOwxZCD7TR6mzCzvYSBCpVaY4cJmRVKf P8G1HTdXq9LmB5D2SeKMiEQ2GSndIXFBm9UfR9oUaryqK/f9BHfJ7dM6xChiU3HWB44gy ON2S9JHaD9cw5rgKT0bqtreu7P+M8jqGQKqfoaVhmQg48R+SDBxs/GEQFommYvFh/Wa5O Y3wJMESUFpZFmPkAifiIbRpgXU+X2ic66ohVWUoez6bFR2iVEPkyVPM1GLeqBWw4itQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796119947; h=Received:DKIM-Signature:Received:Received:X-ME-Sender: X-ME-Proxy-Cause:X-ME-Proxy:Feedback-ID:Received:X-Mailer: MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type:Content-Transfer-Encoding; bh=+3qVd8Ui+waHhlJtAxrTO0C0JdPIV2K/bXcSas3bbyg=; b=brtJEakgpN4ZP8zi4zwM3qhcZ09mln9vQupT0DsAsWGuLL/grnDE0HMBXwm9juDMWzRN TTbK2Qw0s06rruOCKlSlCKSu21V0qX+5jRrTzJkISbskgjJeCR4UdyXvmapYhDwiG/2JD hhhtU/sKnQK31XYh2qmsSrgyAi4b/b/wkGtFTt+inshzTrHpCEZ+iK5o4As/x7ks3seak a0RgrJdetOE5CFqKX2+Af78RMB0qlshkzNDDBW+wKOs0Ydk9Kg1AftAqUb/LKs9Hg4wiU g7BhIis+1YoeXBtvovZJETrwvl0rWwgQdLQqPyxJasfoyEsuWu4flJb6mkzS+3TtzDg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=JykTgRVg; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2137C606A320; Tue, 1 Dec 2026 10:12:26 +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 smtp.kernel.org (Postfix) with ESMTPSA id 6123A1F0089A; 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-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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 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?