x86/virt/tdx: Configure TDX module with the TDMRs and global KeyID
authorKai Huang <kai.huang@intel.com>
Fri, 8 Dec 2023 17:07:33 +0000 (09:07 -0800)
committerDave Hansen <dave.hansen@linux.intel.com>
Fri, 8 Dec 2023 17:12:41 +0000 (09:12 -0800)
commit554ce1c36d1bbeaec42ba870bad75e200af204be
tree6b18e1bd68f32934d5d2956576a5198ca1264b9e
parentdde3b60d572c941e2c72d22c18a08586fb67bb50
x86/virt/tdx: Configure TDX module with the TDMRs and global KeyID

The TDX module uses a private KeyID as the "global KeyID" for mapping
things like the PAMT and other TDX metadata.  This KeyID has already
been reserved when detecting TDX during the kernel early boot.

Now that the "TD Memory Regions" (TDMRs) are fully built, pass them to
the TDX module together with the global KeyID.

Signed-off-by: Kai Huang <kai.huang@intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Isaku Yamahata <isaku.yamahata@intel.com>
Reviewed-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Reviewed-by: Yuan Yao <yuan.yao@intel.com>
Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/all/20231208170740.53979-13-dave.hansen%40intel.com
arch/x86/virt/vmx/tdx/tdx.c
arch/x86/virt/vmx/tdx/tdx.h