From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) (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 A13A03F1ABC; Wed, 20 May 2026 13:40:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779284442; cv=none; b=f0j+lBU/cHRQ9cZ13YTcUZNEoLxy2g8b6woDSxdplzgPAG7sHnkomX+s/KUENYYnr1+dHDGv2exwkEG7z5sZngU6EMDUWckywUiJWtgGge93E1fNavh6We2/sm0bpP5RcoJTB/KpZb/PyOqbiQjKFXOoXy/BT9UiwIFhv5ykdMY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779284442; c=relaxed/simple; bh=g7DBKzISsVeAPEr5fRf6vFci06L9JPnHLfj1n6CF7wg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iFnVuEanIScXCD1OOW8xOCqmw5mFsfwjEdM+Lile+tLhslE5HKsbUeiriV3E3vK92Pgb4KeqOsnOCndQahaKSEdOS428aXGA2/s3xToUMnxHh14EMTNK0WOORO4wuNGVKS+NjwPDH92+hBkjOXicGbH5yaRk5g9/brnsZVKSB+s= 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=CS22Quc4; arc=none smtp.client-ip=198.175.65.19 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="CS22Quc4" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1779284438; x=1810820438; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=g7DBKzISsVeAPEr5fRf6vFci06L9JPnHLfj1n6CF7wg=; b=CS22Quc4VwmvZlXrV95N2sSD1CeF8wV5mrb7F6ylyKdxbnxh1+R2xtn5 JEa4v4Cfa9u/HUP4ek0uEVi5+Qz/VFXDR7Hjvvy1Ho0VIu34Ltni77Vk+ mdIYGcAbA8CQepOtGGiqwS8MAV8QdutxZtznwsEUO9ZdLKq9P9TCNeTcO nSglj3dHft2jPIOJ0aXCt75FZ4GIcj2xXJQmVI8ky8Zmc+/ajrbJH/zcH jJa+zyLBEr0O2v68Cb1a+Da0xmFwlWHrn2oMMiF64sYevDCVLOXiNglo2 8a+q95zD+21usyg5Qf89PicZJhLXag3wB6hdBjvxjW4sAzVJrtwDooBfD w==; X-CSE-ConnectionGUID: 4pXlbu0fRomlnumLAkoUDQ== X-CSE-MsgGUID: oe814QsnSEGTS+JAdyN40A== X-IronPort-AV: E=McAfee;i="6800,10657,11792"; a="80146676" X-IronPort-AV: E=Sophos;i="6.23,244,1770624000"; d="scan'208";a="80146676" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2026 06:40:38 -0700 X-CSE-ConnectionGUID: Br5tsnbLSS+ReL3/FmNuyg== X-CSE-MsgGUID: 3m2xUakcTpifgy+YxDwPOg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,244,1770624000"; d="scan'208";a="235924061" Received: from 984fee019967.jf.intel.com ([10.23.153.244]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2026 06:40:37 -0700 From: Chao Gao To: kvm@vger.kernel.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Cc: binbin.wu@linux.intel.com, dave.hansen@linux.intel.com, djbw@kernel.org, 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, xiaoyao.li@intel.com, yan.y.zhao@intel.com, Chao Gao , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Jonathan Corbet , Shuah Khan Subject: [PATCH v10 25/25] x86/virt/tdx: Document TDX module update Date: Wed, 20 May 2026 06:38:28 -0700 Message-ID: <20260520133909.409394-26-chao.gao@intel.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260520133909.409394-1-chao.gao@intel.com> References: <20260520133909.409394-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 Reviewed-by: Kiryl Shutsemau (Meta) Reviewed-by: Rick Edgecombe --- Documentation/arch/x86/tdx.rst | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/Documentation/arch/x86/tdx.rst b/Documentation/arch/x86/tdx.rst index 1a3b5bac1021..9d2b7db166b5 100644 --- a/Documentation/arch/x86/tdx.rst +++ b/Documentation/arch/x86/tdx.rst @@ -73,6 +73,40 @@ initialize:: [..] virt/tdx: 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 updates, 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 updates have 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. + +If updates failed, running TDs may be killed and further TDX operations may +not be 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.52.0