TDX host: metadata reading tweaks and feature mandate
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v9 Latest6 patches 0 repliesNew
- v89 patches 7 repliesSuperseded
- v710 patches 9 repliesSuperseded
Earlier versions · 6
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v6 | 10 patches | 23 replies | Superseded | |
| v5 | 8 patches | 8 replies | Superseded | |
| v4 | 8 patches | 15 replies | Superseded | |
| v3 | 8 patches | 33 replies | Superseded | |
| v2 | 10 patches | 33 replies | Superseded | |
| v1 | 9 patches | 22 replies | Superseded |
Changes in v9 from the cover letter
- Take out the "running out of reserved areas" bugfix:
- Remove CMR reading code in patch 3.
- Remove patch 7-8.
- Take out the patch 5 which adds nice-to-have header file inclusions but it is not mandatory for KVM TDX.
- Minor changelog improvement suggested by Rick and Reinette.
- Rebase to tip/x86/tdx.
Patches in v9 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | x86/virt/tdx: Rename 'struct tdx_tdmr_sysinfo' to reflect the spec betterarch/ arch/ | +19 | 0 replies | |
| 2/6 | x86/virt/tdx: Start to track all global metadata in one structurearch/ arch/ | +24 | 0 replies | |
| 3/6 | x86/virt/tdx: Use auto-generated code to read global metadataarch/ arch/ | +73 | 0 replies | |
| 4/6 | x86/virt/tdx: Use dedicated struct members for PAMT entry sizesarch/ arch/ | +12 | 0 replies | |
| 5/6 | x86/virt/tdx: Switch to use auto-generated global metadata reading codearch/ arch/ | +2 | 0 replies | |
| 6/6 | x86/virt/tdx: Require the module to assert it has the NO_RBP_MOD mitigationarch/ arch/ | +21 | 0 replies |
Reviews trailers per patch
All 6 patches have a Reviewed-by or Acked-by.
| Patch | Adrian Hunter | Dan Williams | Nikolay Borisov |
|---|---|---|---|
| 1/6 | R-b | R-b | |
| 2/6 | R-b | R-b | |
| 3/6 | R-b | ||
| 4/6 | R-b | R-b | |
| 5/6 | R-b | R-b | |
| 6/6 | R-b | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v9 0/6] TDX host: metadata reading tweaks and feature mandate
This series replaces the existing TDX module metadata reading code with a new auto-generated global metadata infrastructure for basic KVM TDX support:
1) read "TDX_FEATURES0" field to mandate the "not clobbering RBP when exiting from TDX guest" feature is supported during the module initialization.
Some old modules can clobber host's RBP when exiting from the TDX guest, and currently they can be initialized successfully. We don't want to run TDX guests using such modules. We should just fail to initialize them to avoid memory/CPU cycle cost of initializing TDX module [1].
2) provide metadata reading infrastructure which is required to read more metadata fields to support KVM TDX. The patches which do so can be found at [2][3].
Hi Dave,
This series targets x86 tip. This is the bare minimum pre-work to support KVM TDX. I appreciate if you could review and take this as we think we have addressed all the comments.
This series has dropped all changes that are not required for TDX KVM base support. It includes only:
- Host metadata infrastructure, which will be used by the KVM patches to get TDX module information to boot a TD.
- The NO_RBP_MOD enforcement, which is required to avoid clobbering RBP when running TDX guests using old TDX modules.
The script used to auto-generate the metadata reading code in patch 3 can be found in [4].
History:
v8 -> v9:
- Take out the "running out of reserved areas" bugfix:
- Remove CMR reading code in patch 3.
- Remove patch 7-8.
- Take out the patch 5 which adds nice-to-have header file inclusions but it is not mandatory for KVM TDX.
- Minor changelog improvement suggested by Rick and Reinette.
- Rebase to tip/x86/tdx.
v8: https://lore.kernel.org/lkml/[email protected]/
v7 -> v8:
- Address Dave's comments to remove the code to print module version and CMRs:
- Remove the code which reads module version in the auto-generated code.
- Remove the patch which prints module version (patch 10 in v7)
- Remove the code which prints CMRs in patch 7.
- Update the changelog of some patches that mentioned "reading module version" and "print CMRs".
- Collect Nikolay's tag.
Previous versions and more background info please see:
[1]: https://lore.kernel.org/[email protected]/
[2]: https://git.kernel.org/pub/scm/virt/kvm/kvm.git/commit/?h=kvm-coco-queue&id=594fc3256733fe2c5b8bd9007effea2083431861
[3]: https://git.kernel.org/pub/scm/virt/kvm/kvm.git/commit/?h=kvm-coco-queue&id=8bb81c97ec53b8a3dea29572cdb6ecfa4ff3a181
[4]: https://lore.kernel.org/[email protected]/
Kai Huang (5):
x86/virt/tdx: Rename 'struct tdx_tdmr_sysinfo' to reflect the spec
better
x86/virt/tdx: Start to track all global metadata in one structure x86/virt/tdx: Use dedicated struct members for PAMT entry sizes x86/virt/tdx: Switch to use auto-generated global metadata reading
code
x86/virt/tdx: Require the module to assert it has the NO_RBP_MOD
mitigation
Paolo Bonzini (1):
x86/virt/tdx: Use auto-generated code to read global metadata
arch/x86/virt/vmx/tdx/tdx.c | 95 +++++++-------------- arch/x86/virt/vmx/tdx/tdx.h | 40 +-------- arch/x86/virt/vmx/tdx/tdx_global_metadata.c | 48 +++++++++++ arch/x86/virt/vmx/tdx/tdx_global_metadata.h | 25 ++++++ 4 files changed, 108 insertions(+), 100 deletions(-) create mode 100644 arch/x86/virt/vmx/tdx/tdx_global_metadata.c create mode 100644 arch/x86/virt/vmx/tdx/tdx_global_metadata.h
base-commit: 564ea84c8c14b007d7838bfb1327295b873573be
Signature · 1 line
2.47.1