REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3249
Intel's Trust Domain Extensions (Intel TDX) refers to an Intel technology
that extends Virtual Machines Extensions (VMX) and Multi-Key Total Memory
Encryption (MKTME) with a new kind of virutal machines guest called a
Trust Domain (TD). A TD is desinged to run in a CPU mode that protects the
confidentiality of TD memory contents and the TD's CPU state from other
software, including the hosting Virtual-Machine Monitor (VMM), unless
explicitly shared by the TD itself.
The patch-sets to support Intel TDX in OvmfPkg is split into several waves.
This is wave1 which adds Intel TDX support in OvmfPkg/ResetVector.
Patch 1 add the PCDs of BFV/CFV. BFV is the code part of the image. CFV is
the configuration part. BFV is measured by VMM and CFV is measured by TDVF
itself.
Patch 2 add TdxMetadata in OvmfPkg/ResetVector. It describes the
information about the image so that VMM can do the initialization and
measurement based on these information.
Patch 3 add a null entry point of InitTdx in UefiCpuPkg/ResetVector. The
actual implemenation of InitTdx is in OvmfPkg/ResetVector.
Patch 4 add the ReloadFlat32 in UefiCpuPkg/ResetVector.
Patch 5 update the UefiCpuPkg/Vtf0/Main.asm to add Main32 entrypoint. It
is because on reset all the CPUs are in 32-bit protected mode.
Patch 6 put above stuff all together to enable Intel TDX in OvmfPkg
ResetVector phase.
[TDX]: https://software.intel.com/content/dam/develop/external/us/en/
documents/tdx-whitepaper-final9-17.pdf
[TDVF]: https://software.intel.com/content/dam/develop/external/us/en/
documents/tdx-virtual-firmware-design-guide-rev-1.pdf
Code is at https://github.com/mxu9/edk2/tree/tdvf_wave1
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
CC: Debkumar De <debkumar.de@intel.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
Min Xu (6):
OvmfPkg: Add Tdx BFV/CFV PCDs and PcdOvmfImageSizeInKb
OvmfPkg: Add Tdx metadata
UefiCpuPkg/ResetVector: Add InitTdx in UefiCpuPkg
UefiCpuPkg/ResetVector: Add ReloadFlat32 in UefiCpuPkg
UefiCpuPkg/ResetVector: Add Main32 entry point in Main.asm
OvmfPkg/ResetVector: Update ResetVector to support Tdx
OvmfPkg/OvmfPkg.dec | 13 +++
OvmfPkg/OvmfPkgDefines.fdf.inc | 12 ++-
OvmfPkg/ResetVector/Ia16/ResetVectorVtf0.asm | 38 ++++++++
OvmfPkg/ResetVector/Ia32/Flat32ToFlat64.asm | 47 +++++++++
OvmfPkg/ResetVector/Ia32/InitTdx.asm | 57 +++++++++++
OvmfPkg/ResetVector/Ia32/PageTables64.asm | 41 ++++++++
OvmfPkg/ResetVector/ResetVector.inf | 11 ++-
OvmfPkg/ResetVector/ResetVector.nasmb | 64 +++++++++++-
OvmfPkg/ResetVector/X64/TdxMetadata.asm | 97 +++++++++++++++++++
UefiCpuPkg/ResetVector/Vtf0/Ia32/InitTdx.asm | 15 +++
.../ResetVector/Vtf0/Ia32/ReloadFlat32.asm | 43 ++++++++
UefiCpuPkg/ResetVector/Vtf0/Main.asm | 45 +++++++++
UefiCpuPkg/ResetVector/Vtf0/Vtf0.nasmb | 2 +
13 files changed, 481 insertions(+), 4 deletions(-)
create mode 100644 OvmfPkg/ResetVector/Ia32/InitTdx.asm
create mode 100644 OvmfPkg/ResetVector/X64/TdxMetadata.asm
create mode 100644 UefiCpuPkg/ResetVector/Vtf0/Ia32/InitTdx.asm
create mode 100644 UefiCpuPkg/ResetVector/Vtf0/Ia32/ReloadFlat32.asm
--
2.29.2.windows.2
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#77675): https://edk2.groups.io/g/devel/message/77675
Mute This Topic: https://groups.io/mt/84144136/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-