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