From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=40.93.194.20 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796297763; b=jMX43eYAT4a72JgLVf+n5Pz+nuyGFnZmxBgnrKFMx34rQo99ZB32StgTVfEFFzAfvS/S i4qIgObDWu/CJqWVrK+wHN4v8GnFvts4rA5vvDsBw6LKKeXlTv+DGdaInQ/8l538cVmZN YwGVcd5Zf7qg5AMRjsz4gbbyJb1XKESxtgxfoDDDacHSJTTAjKUhz6D2oAh6+37KGdzNA v3Aq0zULWnnVwVKe4dIn66RqYqkQ3mWILUae7+m/SydjTK7BoQgPYsFD5n20UxMNhYlpS MdbaLXPBuiK3OMcGao/2hnRcuiH+eWI6nyAIP49r7ooy0N92q1b7uuXWpo1byGyvWkQ== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796297763; h=DMARC-Filter:DKIM-Signature:Received:Received: X-MS-Exchange-Authentication-Results:Received-SPF:Received:Received: Received:Received:From:To:CC:Subject:Date:Message-ID:X-Mailer: MIME-Version:Content-Transfer-Encoding:Content-Type: X-EOPAttributedMessage:X-MS-PublicTrafficType: X-MS-TrafficTypeDiagnostic:X-MS-Office365-Filtering-Correlation-Id: X-MS-Exchange-SenderADCheck:X-MS-Exchange-AntiSpam-Relay: X-Microsoft-Antispam:X-Microsoft-Antispam-Message-Info: X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-OriginatorOrg: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-Id: X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-Transport-CrossTenantHeadersStamped; bh=AO/alpj4s+6WW7VW0u9K3yztUK/+A/JdXb6ujPCOSjs=; b=m+bahrRtzI0HwCI7+CKldlNK9twd2f9Q9J3PRo/T0XhQ/4EZSVEfC1bL737j8UH7GSFO GKKUZIGOPsIEBGusG2wc2sZOOlabTaTTBTuiJ0kVjdX5iPzAkaoeHhdX42eV4xdiWJhm/ lwxmBE61sSNzH5lXGuhxJiKjiLRAt/Iz98EpsIHVY2K02OtPqnMEqQ8bG6ZUNCaEZtcG9 p5RcmGe6NYKpt0Y4na6BI8IpBgMvo2hMvzqc9YtqafZwN5pW2tdAKn7DSKaos2+8mE4G9 CfFHugo+rAMySoUACyJaG9W+UHRwcG8n20oojdAVL61O3ll8l00qfS3lfnRgO4LaShw== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=hGBobKaU; arc=pass header.oldest-pass=0 smtp.remote-ip=40.93.194.20 Received: from SN4PR0501CU005.outbound.protection.outlook.com (mail-southcentralusazon11011020.outbound.protection.outlook.com [40.93.194.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (secp384r1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E132606A32C; Thu, 3 Dec 2026 11:36:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0E132606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=hGBobKaU ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NPf2S/kAjJ8HdOUGvdxOmSlAY2CuiulIzcfO1Cg8ZJunUAbR2BhZQuusWqMr48ei99YyA7sV62cwjPnrAIucrumW48LvqYuWxgMSll+wtBnzkt3DZW0LYyqEY95x4u+v3ZvyWiCsLC+Es+1ecvqBcSAaWedmTYn4q+0D5moER3fqUxlMhzUoyi9XBGaPqJzjLoxJNhAP2gbtbwCiSgBTwlOgZuFi0h+J7AaHtbHlIXccVP36NQr6/XQ/+JAPeZHncXRs8cxDC5T5q4pJKe++lm92Na8Y0JvnHQy8M5Cktxj0w58qiFQC+Ffff20OkYiipjBIDkkmmHItrGXOl/dLjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AO/alpj4s+6WW7VW0u9K3yztUK/+A/JdXb6ujPCOSjs=; b=pgR2S0vek+L1sIcZJe3Hxz322GDZefOosS3ow3Np8+qZjd0+ctPm0g9YpJIOQ9KoC+wk0pxJ0xgsWpq8KbzqLkzYGzGrUEPbQRXBZEccpmWl40uP66HBjldBt1Co7ctXrz1NC9b8vUDaholhapXqGUv0yfAA+lAcYOEiABQTelft59jimm5QqcLDxprWIIiVR9O2vdvMVtUDPL75XCE6iSr3CQKwvmr8hRUZ5ULPT9bj3uA1LfEXqNHT/aq7EGM/SayM8IlcuGtyJ9OAYWtHaB+ldoe5FiUnU6497XrTLCPD1wJfHvFFilrZayjpxeBz26IvQ2t9qKfvKeA/9SmpRQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AO/alpj4s+6WW7VW0u9K3yztUK/+A/JdXb6ujPCOSjs=; b=hGBobKaU1gxJrCtCyNhTlrvLht8mRzKYBzZPN/W+HCvOtxZAHMWsBxmThk38AuOSTksXQxPdezloixsW3nJkKft4XJhwHfHuun9mgWDjLka333rWjzHRQpn9W7KFSOq3Utk0RUQ5LOdTQC0rl5A/J2dJi+2bbRVsecRPmr2alG4= Received: from PH7P220CA0134.NAMP220.PROD.OUTLOOK.COM (2603:10b6:510:327::34) by SJ1PR12MB6363.namprd12.prod.outlook.com (2603:10b6:a03:453::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.10; Thu, 3 Dec 2026 11:35:56 +0000 Received: from CY6PEPF0000004D.namprd03.prod.outlook.com (2603:10b6:510:327:cafe::8f) by PH7P220CA0134.outlook.office365.com (2603:10b6:510:327::34) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.688.12 via Frontend Transport; Thu, 3 Dec 2026 11:35:55 +0000 X-MS-Exchange-Authentication-Results: mx.microsoft.com 1; spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=satlexmb08.amd.com; pr=C Received: from satlexmb08.amd.com (165.204.84.17) by CY6PEPF0000004D.mail.protection.outlook.com (10.167.247.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.662.3 via Frontend Transport; Thu, 3 Dec 2026 11:35:55 +0000 Received: from satlexmb10.amd.com (10.181.42.219) by satlexmb08.amd.com (10.181.42.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57; Thu, 3 Dec 2026 05:35:53 -0600 Received: from satlexmb07.amd.com (10.181.42.216) by satlexmb10.amd.com (10.181.42.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57; Thu, 3 Dec 2026 05:35:53 -0600 Received: from pankaj-M75q.amd.com (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server id 15.2.2562.57 via Frontend Transport; Thu, 3 Dec 2026 05:35:52 -0600 From: Pankaj Gupta To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , , Jonathan Corbet , Shuah Khan , , CC: Arnd Bergmann , Dapeng Mi , Marco Elver , "H . Peter Anvin" , "Tom Lendacky" , Ard Biesheuvel , "Kiryl Shutsemau" , Ilias Apalodimas , , Mike Rapoport , , , , Ethan Nelson-Moore , Karl Mehltretter , Pankaj Gupta Subject: [PATCH v2] Documentation: kernel-parameters: memmap= and mem= in confidential guests Date: Thu, 3 Dec 2026 05:35:47 -0600 Message-ID: <20261203113547.250526-1-pankaj.gupta@amd.com> X-Mailer: git-send-email 2.34.1 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY6PEPF0000004D:EE_|SJ1PR12MB6363:EE_ X-MS-Office365-Filtering-Correlation-Id: 44526bc3-d244-452e-2f63-08df513197e4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|82310400026|36860700016|1800799024|23010399003|11063799006|261009223027099003|3023799007|13003099007|18002099003|10067099003|56012099006|261102123227099003|261026121527099003|261021121427099003; X-Microsoft-Antispam-Message-Info: EdherbG5z0NTJVVll0CXJGKvvOlSt8AJGAyt+UxoP8T0CjzTMDfVzYqOPJ+SUoVuhIpJ+9uEpVAqDNaptO+TiOtEqulLsHkrA1FiAglgJssnZNUlp+1UwAUcdBCr04ha6To1u/tVOvtpoZVMy8IzsU3GfoMC6WGsznaa2U46vsFOEG3hR6NlJA33o243D2CpCKZ8kK/SSRdEWlFNju+DkEilTWP6UU5Si7eqRr9J71zJHxXnnsq/4zJASSM7n8YBwl0Vpm2UtEHr5zcx7ppGvnxuhzGNZu4NixcGywZOD5VUX6v3rEJw7jdq7RP00JKvnvcif/qxZFAsb0CQSi3pgA40m4E+PTuDly6mydwHSqTcqB1owGJcnzDoWshDwBbVNhV4KtGRVBYZ57LNA4HnVRd6UOHIvEvql1Yhf66+sinsiVGzIiBHH2H0SUBaFMjllg/gwLiUe80ylQFz/xYwPN5YTp/GmSnL++uoWAyHfVuUQHtPsB5xUmTmXrey+kzNJtsaYWIaetRKF4Re9E4OMSPWjpIGDz5iSU9beHQMyqpTNukTHzAe0u0jKnpRJH9HZ3ShBzOm21QSAEcba1oSylEel777muIz5DXAEyobEdblqjlDXiB/xjItOwuynDQadkWVUHyIAC80eo/XW5Qx2w== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb08.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(7416014)(82310400026)(36860700016)(1800799024)(23010399003)(11063799006)(261009223027099003)(3023799007)(13003099007)(18002099003)(10067099003)(56012099006)(261102123227099003)(261026121527099003)(261021121427099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: u4Vi5sAnUeP/CNZ+goHVvnSNTUNs2WRnu+0qJEhwZdogndYcSmODzCp1Z9i6+KGon0R6Yaqu9MvB/XwPby81aVEupaX2o7d4SzKhYQUbIuiwuxHZzyClGStMQKbs50c0aC3J8oHJP5gXyy5BohRv7sycfyt33EceYc2O6CCTDZqTLoU4LTTw01VrP5TSIdkRp1FBlyRtJZmvwj/3sgPV016M6vLh7a4Gd8lHPQ+wYMuKWKSpHTHnVcp9Hg4tw71BalETX8DBFbsCy06WtPQmPRNgXL9Ztyk+kvG7VdNqDKKYnvPP7IGvbF78a2gornvDFICTGRbXhHgTGuuL3CdvnB+U8jSrY83mcdPlNmlE0aW9sKZzLyvG9eXzE7bFKvHAigDYZ4ngiOmuggx7mFHGvBVQoi5iGBcm4bBcY+OFZmU7ee3s7N+latmalaEvFuHO X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2026 11:35:55.2610 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 44526bc3-d244-452e-2f63-08df513197e4 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[satlexmb08.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY6PEPF0000004D.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR12MB6363 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 are best effort. Link: https://lore.kernel.org/all/96be8f5a-8f65-48ff-8263-1d5d5f706354@intel.com/ Suggested-by: Ard Biesheuvel Signed-off-by: Pankaj Gupta --- v2: - Document mem= and memmap= as best effort, as suggested by Ard, instead of describing the unaccepted memory bitmap. v1: https://lore.kernel.org/all/20261125120301.223907-1-pankaj.gupta@amd.com/ Documentation/admin-guide/kernel-parameters.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index dce9b8f3ae98..9636e662fed1 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -3930,6 +3930,10 @@ Kernel parameters in above case 3, memory may need be hot added after boot if system memory of hypervisor is not sufficient. + This option is best effort and may break the mutual + consistency of the various memory descriptions provided + by the platform firmware. + mem=nn[KMG]@ss[KMG] [ARM,MIPS,EARLY] - override the memory layout reported by firmware. @@ -3971,6 +3975,10 @@ Kernel parameters Example: memmap=100M@2G,100M#3G,1G!1024G + This option is best effort and may break the mutual + consistency of the various memory descriptions provided + by the platform firmware. + 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