From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3FE0F36C584; Sun, 15 Mar 2026 13:59:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.15 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773583192; cv=none; b=EQ9LYHohY/5wWtUdCgzhhSITdZ1u1c57rywheb3S/tl5TkgL/2IuCp87hCkFtNdvH8RxkERosrpWzI1krtBoyaValn+YXbUfNgZF8tXpmRkhvJPI7KcJfhSmdf/ajd0buvAzQm4+07UiIEbUpSd4cfpslDnLlapr+8rpFGKyv40= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773583192; c=relaxed/simple; bh=lS5h9Kr8Hw4PlPxrBW5fZQ5sCJHX/djsuyeiSlkQS6s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YaScsL6WzLHK3p2i7lLOoC7H5bQ7C/HzwyiXWeW4DTarof+lZXykO+LsPPoPQKMJicT6wwSx8NxNuzhuAuujybDscilQYWvH7K5cv/yKu0iY8xTRJ5XxdAS8qW73csNqrUBI+HyHZqSSF//BuRNAS0n+0cERoQjsPUvyN3KJYbY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=PJU4DBGX; arc=none smtp.client-ip=192.198.163.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="PJU4DBGX" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1773583191; x=1805119191; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=lS5h9Kr8Hw4PlPxrBW5fZQ5sCJHX/djsuyeiSlkQS6s=; b=PJU4DBGXdlntGfSmO3sFko+XibzBgHgl9MPNWhNwiKNlpZEuiYs615+S Iv0xUcT1uiLWgef+tIjVfXzrSSmBRGyyODPzzO4eMfRwPRA6PhVijtUbe TgpIjSJydtSyHVpmCq3cIc3L5SApDveGu4aHT3cmVljxZJ9rC34FZTpCc no82XrY6xHE62SvWjWNscb+wCRXhG314xb0Piajp/KrST/YuIVyZyN6On KtlWWK5yfebm5RlMs1yLRnppyfHF2ajeWpaMLQbLzCfmhCw4M3JGeH2YM 6Z+pY74yYJVwIf3EtS0V1u11J/MNZ053O7lbwnEsBfmtJLR49RBvJCkeW Q==; X-CSE-ConnectionGUID: M833PB0tTMeHwzDrBybwgg== X-CSE-MsgGUID: 1bdJFGJWR+qfKbJTL0/vWA== X-IronPort-AV: E=McAfee;i="6800,10657,11730"; a="74732573" X-IronPort-AV: E=Sophos;i="6.23,122,1770624000"; d="scan'208";a="74732573" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2026 06:59:46 -0700 X-CSE-ConnectionGUID: u20j5D/XS0OuA2jry8JNxA== X-CSE-MsgGUID: r9qqBnKfQ9iPruNxn5RNcA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,122,1770624000"; d="scan'208";a="226123090" Received: from 984fee019967.jf.intel.com ([10.23.153.244]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2026 06:59:46 -0700 From: Chao Gao To: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-coco@lists.linux.dev, kvm@vger.kernel.org Cc: binbin.wu@linux.intel.com, dan.j.williams@intel.com, dave.hansen@linux.intel.com, ira.weiny@intel.com, kai.huang@intel.com, kas@kernel.org, nik.borisov@suse.com, paulmck@kernel.org, pbonzini@redhat.com, reinette.chatre@intel.com, rick.p.edgecombe@intel.com, sagis@google.com, seanjc@google.com, tony.lindgren@linux.intel.com, vannapurve@google.com, vishal.l.verma@intel.com, yilun.xu@linux.intel.com, Chao Gao , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Jonathan Corbet , Shuah Khan Subject: [PATCH v5 21/22] x86/virt/tdx: Document TDX module update Date: Sun, 15 Mar 2026 06:58:41 -0700 Message-ID: <20260315135920.354657-22-chao.gao@intel.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260315135920.354657-1-chao.gao@intel.com> References: <20260315135920.354657-1-chao.gao@intel.com> Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Document TDX module update as a subsection of "TDX Host Kernel Support" to provide background information and cover key points that developers and users may need to know, for example: - update is done in stop_machine() context - update instructions and results - update policy and tooling Signed-off-by: Chao Gao Reviewed-by: Kai Huang --- v5: - use "update" when refer to the update feature/concept [Kai] --- Documentation/arch/x86/tdx.rst | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/Documentation/arch/x86/tdx.rst b/Documentation/arch/x86/tdx.rst index 61670e7df2f7..d4e257542d4c 100644 --- a/Documentation/arch/x86/tdx.rst +++ b/Documentation/arch/x86/tdx.rst @@ -99,6 +99,42 @@ initialize:: [..] virt/tdx: module initialization failed ... +TDX module Runtime Update +------------------------- + +The TDX architecture includes a persistent SEAM loader (P-SEAMLDR) that +runs in SEAM mode separately from the TDX module. The kernel can +communicate with P-SEAMLDR to perform runtime updates of the TDX module. + +During update, the TDX module becomes unresponsive to other TDX operations. +To prevent components using TDX (such as KVM) from experiencing unexpected +errors during updates, updates are performed in stop_machine() context. + +TDX module update has complex compatibility requirements; the new module +must be compatible with the current CPU, P-SEAMLDR, and running TDX module. +Rather than implementing complex module selection and policy enforcement +logic in the kernel, userspace is responsible for auditing and selecting +appropriate updates. + +Updates use the standard firmware upload interface. See +Documentation/driver-api/firmware/fw_upload.rst for detailed instructions + +Successful updates are logged in dmesg: + [..] virt/tdx: version 1.5.20 -> 1.5.24 + +If updates failed, running TDs may be killed and further TDX operations may +be not possible until reboot. For detailed error information, see +Documentation/ABI/testing/sysfs-devices-faux-tdx-host. + +Given the risk of losing existing TDs, userspace should verify that the +update is compatible with the current system and properly validated before +applying it. + +A reference userspace tool that implements necessary checks is available +at: + + https://github.com/intel/tdx-module-binaries + TDX Interaction to Other Kernel Components ------------------------------------------ -- 2.47.3