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=1796119684; b=z5EUtiWe6aounBvW4c6wM0o3M0Xu2UBmhtc/iBEqtK27nIEjUNRzRhd19CINWnpWzPCq nkzrr4HqLTYn+yjOnbEdBtNLlk8Rlg/9Pi9XsSIBfqDAWeJJynAny0shBiqd9I08mFoFZ 6BSt68vxqeSOHPieAdFS31g8oU+xkSTL+Ccci8Tv09JZ7PKDmD16OIz8WUH3VBYYqg4vw jZxdKdpnQmcXAUj6uCp2Iy68kocpkQacIbLS4TZkXicBOSfmO38JzYjIo9qYUE3Vjnowe sBRRV9rE4H0yI5obCOvZQg5OUt1hm35xIUldxw121Wml93mVkB8OJs7+7JLMwnS8XXw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796119684; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=dXBYxupmoM4LAzynHVbaItMfTx3JjoSsZCKKpqu7Ad8=; b=fK01OEIUgtiFTN6BYsNyD5Hw8GRxfLaMOt1bcqrJviapa+GxLt/Y5TYeNBa3PFOZja2p hGSywqSQppbqUlffVhpOk4UApHPDG6ltupu2IU5TxEF6orW6luSke0YkFxH9LF6gY9n1E 2poc5JRo6dzVHsiiKe4Omuo5c6OKHHPum8QsJBSiK+m1n6uxPp7Cuoa2XUttJX3T/iCKX WOBkRXFGogytFhc1E62CNIvkwCfrst4iwWspBTrwXflHEkEm/wiTEiQ8o4MOHanMiYk0j lSMGqV0QH8bugSH2m3g1I2zxTfH2mlLzvkPOk0qclNAuDnpw9Hyg2r2v3gE62o6zdEw== 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=RX+4NSLK; 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 BD374606A31A; Tue, 1 Dec 2026 10:08:04 +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=RX+4NSLK Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE4131F00A02; Tue, 1 Dec 2026 10:07:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796119684; bh=dXBYxupmoM4LAzynHVbaItMfTx3JjoSsZCKKpqu7Ad8=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=RX+4NSLKhy98ANbCUxMLsbdpBmS1pbDtOPG5/t/uRiEh86Zn/yeLRDbncUFXfJY1A Nfje9x1XoETv/7SnUdJ+cAf77zzVNVoVjj+kJiGHnlSDzW+Cpp+7lsRM6lwJnBk+qL plLg3Ilyo3U8n9fJNgwtGG6eJ/3WgKUz9qDd9zT1ZASx/U7EqMrK4+pT90yrjKF2oU 8k3DhNgFaNIRHu93Xcpe3M7TpfP/5Md/GLGrpDk8E1yN+4FKVXZyDzDFU9nRzJxF+c k2dwitON4b7X89DincsY2LlJE3yrCj+pvS+YvGcQexFoqDL0q2tcT3msjrUZQCWGqH CXa0OzdpzKl1Q== Date: Tue, 1 Dec 2026 12:07:53 +0200 From: Mike Rapoport To: Pankaj Gupta Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Jonathan Corbet , Shuah Khan , rdunlap@infradead.org, linux-doc@vger.kernel.org, Arnd Bergmann , Dapeng Mi , Marco Elver , "H . Peter Anvin" , Tom Lendacky , Ard Biesheuvel , Kiryl Shutsemau , 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 Subject: Re: [PATCH] Documentation: kernel-parameters: memmap= and mem= in confidential guests Message-ID: References: <20261125120301.223907-1-pankaj.gupta@amd.com> 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261125120301.223907-1-pankaj.gupta@amd.com> 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? > + > mem=nn[KMG]@ss[KMG] > [ARM,MIPS,EARLY] - override the memory layout > reported by firmware. > @@ -3971,6 +3977,12 @@ Kernel parameters > Example: > memmap=100M@2G,100M#3G,1G!1024G > > + [X86] Not supported in confidential guests (SEV-SNP, > + TDX) that use unaccepted memory. The unaccepted memory > + bitmap is built before the command line is parsed and > + does not follow memmap=. A memory hole can crash an > + SEV-SNP guest early in boot. > + > 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. > -- > 2.34.1 > > -- Sincerely yours, Mike.