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 85B51606A320 for ; Tue, 1 Dec 2026 10:08:09 +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 kanga.kvack.org (Postfix) id 9B98F6B05B3; Tue, 1 Dec 2026 05:08:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 990B76B05B4; Tue, 1 Dec 2026 05:08:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8A7D06B05BE; Tue, 1 Dec 2026 05:08:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 6F0456B05B3 for ; Tue, 1 Dec 2026 05:08:08 -0500 (EST) Received: from smtpin24.hostedemail.com (lb01a-stub [10.200.18.249]) by unirelay01.hostedemail.com (Postfix) with ESMTP id EC1FC1C48B2 for ; Tue, 1 Dec 2026 10:08:07 +0000 (UTC) X-FDA: 85494988614.24.3FFFD1E Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by imf31.hostedemail.com (Postfix) with ESMTP id 7205220004 for ; Tue, 1 Dec 2026 10:08:05 +0000 (UTC) Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20260515 header.b=RX+4NSLK; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf31.hostedemail.com: domain of rppt@kernel.org designates 172.105.4.254 as permitted sender) smtp.mailfrom=rppt@kernel.org ARC-Seal: i=1; a=rsa-sha256; d=hostedemail.com; s=arc-20220608; cv=none; t=1796119685; b=pyLVf2+pTVyP6BipU4RlprOkkSTpz0kFzW/52lPQqcrU7ROwyxQCV+yjFABBLpyCndk134 Cd6luZI3TBvhnM8rP+E+97Xzmo86qMZqUlkDJGJKosD3baJIuokNmZM3uqxiYqL3VimjLG 5LROsyk6T5aEzWf/yXZ1y8OE5tarnjw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1796119685; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=dXBYxupmoM4LAzynHVbaItMfTx3JjoSsZCKKpqu7Ad8=; b=tFwbLRn4RDp8miHJtBVAA9L0zyAL/if/J4vk4BcPmoHLU4MovvH67eGiRTEG3rLkFz6PX2 DFaxs0A0MvpdTpRwIUQa9rOvR7s/s2dR+oXVB6cBVv6wgdkTnqABANA4zJAXhOTbt1AlBM xdNadG9igjqICzDXPa+d70HtGG9LDWk= ARC-Authentication-Results: i=1; imf31.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20260515 header.b=RX+4NSLK; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf31.hostedemail.com: domain of rppt@kernel.org designates 172.105.4.254 as permitted sender) smtp.mailfrom=rppt@kernel.org Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id E20006126D; Tue, 1 Dec 2026 10:08:04 +0000 (UTC) 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-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261125120301.223907-1-pankaj.gupta@amd.com> X-Rspamd-Queue-Id: 7205220004 X-Stat-Signature: sa73bfpqrzpr4qk4uzpubtt1m8r6anx8 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-Rspam-User: X-Rspamd-Server: rspam04 X-HE-Tag: 1796119685-5655 X-HE-Meta: U2FsdGVkX1+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ACtrB+oZjzPSabCDnV+yEct2r/dzJnC2XENYPsabY46qQLiq83DEOym2naSqSRCXc+7UAFlJD9HGPg0/gUdLzSWlbKMU6FLU/2iAufcDysSFImSqD2HQehs5CJzUeyCA5+2WIo23NBALy+pXcQz6zStbe+pbo6dtgDf5E4ReP1z6CkXAfM0YIXgXHNrsXsVoQSHWor7TMIbxXilvqp6FwttnyJaHak1JlStcDo8bAXxNCF3AKUmpe99uInr6nw0TfUyKKxG98gMQQh82+9So2NEnrZt1YnShQFndAjc/Q4Zy+sfrFfNtCtN0MOePoysbG5kHHlXXNtSuB2Hw6HzQKMQCIDHZuKK5RDyv65fJHK/1KUPfyP9Zx0+BHkj6pe71uw/ABPs67//eCaV8o/PgW96ldfiz0LyOORE7DhKbkqYaWFqyevcQvucRrVbzgxerZgt3lBm0cXK+P48xRkSnihFqGVd4jgqtL/7mAfTxSFFsooOCOHkTq1xynec/ldTM9ISQ== 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 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.