From 7515f45c165269b72ee739e6fc26cc2ef928fc1b Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Mon, 3 Mar 2025 23:14:26 -0800 Subject: [PATCH] coco/guest: Move shared guest CC infrastructure to drivers/virt/coco/guest/ In preparation for creating a new drivers/virt/coco/host/ directory to house shared host driver infrastructure for confidential computing, move configfs-tsm to a guest/ sub-directory. The tsm.ko module is renamed to tsm_reports.ko. The old tsm.ko module was only ever demand loaded by kernel internal dependencies, so it should not affect existing userspace module install scripts. The new drivers/virt/coco/guest/ is also a preparatory landing spot for new / optional TSM Report mechanics like a TCB stability enumeration / watchdog mechanism. To be added later. Cc: Wu Hao Cc: Yilun Xu Cc: Samuel Ortiz Cc: Tom Lendacky Reviewed-by: Alexey Kardashevskiy Reviewed-by: Kuppuswamy Sathyanarayanan Link: https://patch.msgid.link/174107246641.1288555.208426916259466774.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams --- MAINTAINERS | 2 +- drivers/virt/coco/Kconfig | 6 ++---- drivers/virt/coco/Makefile | 2 +- drivers/virt/coco/guest/Kconfig | 7 +++++++ drivers/virt/coco/guest/Makefile | 3 +++ drivers/virt/coco/{tsm.c => guest/report.c} | 0 6 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 drivers/virt/coco/guest/Kconfig create mode 100644 drivers/virt/coco/guest/Makefile rename drivers/virt/coco/{tsm.c => guest/report.c} (100%) diff --git a/MAINTAINERS b/MAINTAINERS index debcd79a264d1..0a1ca9233ccf8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -24560,7 +24560,7 @@ M: Dan Williams L: linux-coco@lists.linux.dev S: Maintained F: Documentation/ABI/testing/configfs-tsm-report -F: drivers/virt/coco/tsm.c +F: drivers/virt/coco/guest/ F: include/linux/tsm.h TRUSTED SERVICES TEE DRIVER diff --git a/drivers/virt/coco/Kconfig b/drivers/virt/coco/Kconfig index ff869d883d954..819a97e8ba994 100644 --- a/drivers/virt/coco/Kconfig +++ b/drivers/virt/coco/Kconfig @@ -3,10 +3,6 @@ # Confidential computing related collateral # -config TSM_REPORTS - select CONFIGFS_FS - tristate - source "drivers/virt/coco/efi_secret/Kconfig" source "drivers/virt/coco/pkvm-guest/Kconfig" @@ -16,3 +12,5 @@ source "drivers/virt/coco/sev-guest/Kconfig" source "drivers/virt/coco/tdx-guest/Kconfig" source "drivers/virt/coco/arm-cca-guest/Kconfig" + +source "drivers/virt/coco/guest/Kconfig" diff --git a/drivers/virt/coco/Makefile b/drivers/virt/coco/Makefile index c3d07cfc087ec..885c9ef4e9fc9 100644 --- a/drivers/virt/coco/Makefile +++ b/drivers/virt/coco/Makefile @@ -2,9 +2,9 @@ # # Confidential computing related collateral # -obj-$(CONFIG_TSM_REPORTS) += tsm.o obj-$(CONFIG_EFI_SECRET) += efi_secret/ obj-$(CONFIG_ARM_PKVM_GUEST) += pkvm-guest/ obj-$(CONFIG_SEV_GUEST) += sev-guest/ obj-$(CONFIG_INTEL_TDX_GUEST) += tdx-guest/ obj-$(CONFIG_ARM_CCA_GUEST) += arm-cca-guest/ +obj-$(CONFIG_TSM_REPORTS) += guest/ diff --git a/drivers/virt/coco/guest/Kconfig b/drivers/virt/coco/guest/Kconfig new file mode 100644 index 0000000000000..ed9bafbdd8548 --- /dev/null +++ b/drivers/virt/coco/guest/Kconfig @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# Confidential computing shared guest collateral +# +config TSM_REPORTS + select CONFIGFS_FS + tristate diff --git a/drivers/virt/coco/guest/Makefile b/drivers/virt/coco/guest/Makefile new file mode 100644 index 0000000000000..b3b217af77cf5 --- /dev/null +++ b/drivers/virt/coco/guest/Makefile @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0 +obj-$(CONFIG_TSM_REPORTS) += tsm_report.o +tsm_report-y := report.o diff --git a/drivers/virt/coco/tsm.c b/drivers/virt/coco/guest/report.c similarity index 100% rename from drivers/virt/coco/tsm.c rename to drivers/virt/coco/guest/report.c -- 2.39.5