Re: [PATCH v2 14/14] virt: arm-cca-guest: TSM_REPORT support for realms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/04/2024 09:42, Steven Price wrote:
From: Sami Mujawar <sami.mujawar@xxxxxxx>

Introduce an arm-cca-guest driver that registers with
the configfs-tsm module to provide user interfaces for
retrieving an attestation token.

When a new report is requested the arm-cca-guest driver
invokes the appropriate RSI interfaces to query an
attestation token.

The steps to retrieve an attestation token are as follows:
   1. Mount the configfs filesystem if not already mounted
      mount -t configfs none /sys/kernel/config
   2. Generate an attestation token
      report=/sys/kernel/config/tsm/report/report0
      mkdir $report
      dd if=/dev/urandom bs=64 count=1 > $report/inblob
      hexdump -C $report/outblob
      rmdir $report

Signed-off-by: Sami Mujawar <sami.mujawar@xxxxxxx>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@xxxxxxx>
Signed-off-by: Steven Price <steven.price@xxxxxxx>
---
  drivers/virt/coco/Kconfig                     |   2 +
  drivers/virt/coco/Makefile                    |   1 +
  drivers/virt/coco/arm-cca-guest/Kconfig       |  11 +
  drivers/virt/coco/arm-cca-guest/Makefile      |   2 +
  .../virt/coco/arm-cca-guest/arm-cca-guest.c   | 208 ++++++++++++++++++
  5 files changed, 224 insertions(+)
  create mode 100644 drivers/virt/coco/arm-cca-guest/Kconfig
  create mode 100644 drivers/virt/coco/arm-cca-guest/Makefile
  create mode 100644 drivers/virt/coco/arm-cca-guest/arm-cca-guest.c

diff --git a/drivers/virt/coco/Kconfig b/drivers/virt/coco/Kconfig
index 87d142c1f932..4fb69804b622 100644
--- a/drivers/virt/coco/Kconfig
+++ b/drivers/virt/coco/Kconfig
@@ -12,3 +12,5 @@ source "drivers/virt/coco/efi_secret/Kconfig"
  source "drivers/virt/coco/sev-guest/Kconfig"
source "drivers/virt/coco/tdx-guest/Kconfig"
+
+source "drivers/virt/coco/arm-cca-guest/Kconfig"
diff --git a/drivers/virt/coco/Makefile b/drivers/virt/coco/Makefile
index 18c1aba5edb7..a6228a1bf992 100644
--- a/drivers/virt/coco/Makefile
+++ b/drivers/virt/coco/Makefile
@@ -6,3 +6,4 @@ obj-$(CONFIG_TSM_REPORTS)	+= tsm.o
  obj-$(CONFIG_EFI_SECRET)	+= efi_secret/
  obj-$(CONFIG_SEV_GUEST)		+= sev-guest/
  obj-$(CONFIG_INTEL_TDX_GUEST)	+= tdx-guest/
+obj-$(CONFIG_ARM_CCA_GUEST)	+= arm-cca-guest/
diff --git a/drivers/virt/coco/arm-cca-guest/Kconfig b/drivers/virt/coco/arm-cca-guest/Kconfig
new file mode 100644
index 000000000000..c4039c10dce2
--- /dev/null
+++ b/drivers/virt/coco/arm-cca-guest/Kconfig
@@ -0,0 +1,11 @@
+config ARM_CCA_GUEST
+	tristate "Arm CCA Guest driver"
+	depends on ARM64
+	default m
+	select TSM_REPORTS
+	help
+	  The driver provides userspace interface to request and
+	  attestation report from the Realm Management Monitor(RMM).
+
+	  If you choose 'M' here, this module will be called
+	  realm-guest.

This needs to be updated to arm-cca-guest.

Suzuki





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux