Skip to content

x86/tdx: Adjust TD settings on boot

Kirill A. Shutemov linux-coco lkml stable 8 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest posting 2/24 patches 0 repliesNew
  2. v6 posting 1/24 patches 5 repliesSuperseded
  3. v5 posting 2/24 patches 4 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v5 posting 1/24 patches9 repliesSuperseded
v44 patches5 repliesSuperseded
v34 patches0 repliesSuperseded
v24 patches12 repliesSuperseded
v14 patches5 repliesSuperseded

v5 from the cover letter

- Rebased to current tip tree;

Patches in v6 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4x86/tdx: Introduce wrappers to read and write TD metadataarch/x86/coco/tdx/tdx.c arch/x86/include/asm/shared/tdx.h+28 -50 replies
2/4x86/tdx: Rename tdx_parse_tdinfo() to tdx_setup()arch/x86/coco/tdx/tdx.c+8 -50 replies
3/4x86/tdx: Dynamically disable SEPT violations from causing #VEsarch/x86/coco/tdx/tdx.c arch/x86/include/asm/shared/tdx.h+69 -170 replies
4/4x86/tdx: Enable CPU topology enumerationarch/x86/coco/tdx/tdx.c arch/x86/include/asm/shared/tdx.h+29 -00 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchKai HuangKuppuswamy Sathyanarayanan
1/4R-b R-b
2/4R-b R-b
3/4A-b
4/4A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCHv6, RESEND 0/4] x86/tdx: Adjust TD settings on boot

The patchset adjusts a few TD settings on boot for the optimal functioning of the system:

- Disable EPT violation #VE on private memory if TD can control it

The newer TDX module allows the guest to control whether it wants to see #VE on EPT violation on private memory. The Linux kernel does not want such #VEs and needs to disable them.

- Enable virtualization of topology-related CPUID leafs X2APIC_APICID MSR;

The ENUM_TOPOLOGY feature allows the VMM to provide topology information to the guest. Enabling the feature eliminates topology-related #VEs: the TDX module virtualizes accesses to the CPUID leafs and the MSR.

It allows TDX guest to run with non-trivial topology configuration.

v5:
- Rebased to current tip tree;
v4:
- Drop unnecessary enumeration;
- Drop TDG.SYS.RD wrapper;
- CC stable@ for SEPT disable patch;
- Update commit messages;
v3:
- Update commit messages;
- Rework patches 3/4 and 4/4;
v2:
- Rebased;
- Allow write to TDCS_TD_CTLS to fail;
- Adjust commit messages;
Kirill A. Shutemov (4):
x86/tdx: Introduce wrappers to read and write TD metadata x86/tdx: Rename tdx_parse_tdinfo() to tdx_setup() x86/tdx: Dynamically disable SEPT violations from causing #VEs x86/tdx: Enable CPU topology enumeration

 arch/x86/coco/tdx/tdx.c           | 140 +++++++++++++++++++++++++-----
 arch/x86/include/asm/shared/tdx.h |  13 ++-
 2 files changed, 130 insertions(+), 23 deletions(-)
Signature · 1 line
2.45.2