public inbox for linux-coco@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH v2 0/4] tsm: Unified Measurement Register ABI for TVMs
@ 2025-02-24  3:20 Cedric Xing
  2025-02-24  3:20 ` [PATCH v2 1/4] tsm: Add TVM Measurement Register support Cedric Xing
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Cedric Xing @ 2025-02-24  3:20 UTC (permalink / raw)
  To: Dan Williams, Kirill A. Shutemov, Dave Hansen, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, x86, H. Peter Anvin
  Cc: linux-kernel, linux-coco, Dionna Amalie Glaze, James Bottomley,
	Dan Middleton, Mikko Ylinen, Sathyanarayanan Kuppuswamy

NOTE: This patch series introduces the Measurement Register (MR) ABI, and
is a continuation of the RFC series on the same topic [1].

This patch series adds a unified interface to the TSM core, allowing TVM
(TEE VM) guest drivers to expose measurement registers (MRs) as attributes
(files) in sysfs. With this interface, applications can read and write
(extend) MRs like regular files, enabling usages like configuration
verification (e.g., verifying a TVM's configuration against digests stored
in static/immutable MRs like MRCONFIGID on TDX or HOSTDATA on SEV) and
runtime measurements (e.g., extending the measurement of a container image
to an RTMR before running it).

Patches included in this series:

- Patch 1 adds TSM APIs for TVM guest drivers to register/expose MRs
  through sysfs.
- Patch 2 provides a sample module demonstrating the usage of the new TSM
  APIs.
- The remaining patches update the TDX guest driver to expose TDX MRs
  through the new TSM APIs.

[1]: https://lore.kernel.org/linux-coco/20241210-tsm-rtmr-v3-0-5997d4dbda73@intel.com/

Signed-off-by: Cedric Xing <cedric.xing@intel.com>
---
Changes in v2:
- Added TSM_MR_MAXBANKS Kconfig option
- Updated Kconfig dependency for TSM_REPORTS
- Updated comments in include/linux/tsm.h
- Updated drivers/virt/coco/tsm-mr.c to use `IS_BUILTIN()` for determining
  if static buffer addresses can be converted to GPAs by `virt_to_phys()`
- Renamed function `tdx_mcall_rtmr_extend()` -> `tdx_mcall_extend_rtmr()`
- Link to v1: https://lore.kernel.org/r/20250212-tdx-rtmr-v1-0-9795dc49e132@intel.com

---
Cedric Xing (4):
      tsm: Add TVM Measurement Register support
      tsm: Add TSM measurement sample code
      x86/tdx: Add tdx_mcall_extend_rtmr() interface
      x86/tdx: Expose TDX MRs through TSM sysfs interface

 Documentation/ABI/testing/sysfs-kernel-tsm |  20 ++
 MAINTAINERS                                |   3 +-
 arch/x86/coco/tdx/tdx.c                    |  36 +++
 arch/x86/include/asm/shared/tdx.h          |   1 +
 arch/x86/include/asm/tdx.h                 |   2 +
 drivers/virt/coco/Kconfig                  |  17 +-
 drivers/virt/coco/Makefile                 |   2 +
 drivers/virt/coco/tdx-guest/Kconfig        |  24 +-
 drivers/virt/coco/tdx-guest/tdx-guest.c    | 115 +++++++++
 drivers/virt/coco/{tsm.c => tsm-core.c}    |   6 +-
 drivers/virt/coco/tsm-mr.c                 | 383 +++++++++++++++++++++++++++++
 include/linux/tsm.h                        |  65 +++++
 samples/Kconfig                            |  13 +
 samples/Makefile                           |   1 +
 samples/tsm/Makefile                       |   2 +
 samples/tsm/tsm_mr_sample.c                | 107 ++++++++
 16 files changed, 789 insertions(+), 8 deletions(-)
---
base-commit: d082ecbc71e9e0bf49883ee4afd435a77a5101b6
change-id: 20250209-tdx-rtmr-255479667146

Best regards,
-- 
Cedric Xing <cedric.xing@intel.com>


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

end of thread, other threads:[~2025-03-19 14:42 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-24  3:20 [PATCH v2 0/4] tsm: Unified Measurement Register ABI for TVMs Cedric Xing
2025-02-24  3:20 ` [PATCH v2 1/4] tsm: Add TVM Measurement Register support Cedric Xing
2025-03-06  1:20   ` Huang, Kai
2025-03-12 18:26     ` Xing, Cedric
2025-03-12 23:11       ` Huang, Kai
2025-03-17 22:49         ` Xing, Cedric
2025-03-19 11:28           ` Huang, Kai
2025-03-19 14:41             ` Dionna Amalie Glaze
2025-02-24  3:20 ` [PATCH v2 2/4] tsm: Add TSM measurement sample code Cedric Xing
2025-02-24  3:20 ` [PATCH v2 3/4] x86/tdx: Add tdx_mcall_extend_rtmr() interface Cedric Xing
2025-02-24  3:20 ` [PATCH v2 4/4] x86/tdx: Expose TDX MRs through TSM sysfs interface Cedric Xing
2025-02-27 22:06 ` [PATCH v2 0/4] tsm: Unified Measurement Register ABI for TVMs Jianxiong Gao
2025-03-17 23:15 ` Sathyanarayanan Kuppuswamy
2025-03-18  3:48   ` Xing, Cedric
2025-03-18 12:44     ` James Bottomley

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