public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 0/6] Add Intel TDX support in OvmfPkg/ResetVector
@ 2021-07-12  1:19 Min Xu
  2021-07-12  1:19 ` [PATCH 1/6] OvmfPkg: Add Tdx BFV/CFV PCDs and PcdOvmfImageSizeInKb Min Xu
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Min Xu @ 2021-07-12  1:19 UTC (permalink / raw)
  To: devel
  Cc: Min Xu, Ard Biesheuvel, Jordan Justen, Brijesh Singh, Erdem Aktas,
	James Bottomley, Jiewen Yao, Tom Lendacky, Eric Dong, Ray Ni,
	Debkumar De

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-07-12  1:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-12  1:19 [PATCH 0/6] Add Intel TDX support in OvmfPkg/ResetVector Min Xu
2021-07-12  1:19 ` [PATCH 1/6] OvmfPkg: Add Tdx BFV/CFV PCDs and PcdOvmfImageSizeInKb Min Xu
2021-07-12  1:19 ` [PATCH 2/6] OvmfPkg: Add Tdx metadata Min Xu
2021-07-12  1:19 ` [PATCH 3/6] UefiCpuPkg/ResetVector: Add InitTdx in UefiCpuPkg Min Xu
2021-07-12  1:19 ` [PATCH 4/6] UefiCpuPkg/ResetVector: Add ReloadFlat32 " Min Xu
2021-07-12  1:19 ` [PATCH 5/6] UefiCpuPkg/ResetVector: Add Main32 entry point in Main.asm Min Xu
2021-07-12  1:19 ` [PATCH 6/6] OvmfPkg/ResetVector: Update ResetVector to support Tdx Min Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox