Re: [PATCH 5/8] MdePkg: Define CC Measure EventLog ACPI Table


Yao, Jiewen
 

HI Sami
I think it is OK to update signature to `CCEL`. That means it will be applicable for other CC, right?

Then, I recommend we add CcType there.

typedef struct {
EFI_ACPI_DESCRIPTION_HEADER Header;
EFI_CC_TYPE CcType; <== new field.
UINT16 Rsvd;
UINT64 Laml;
UINT64 Lasa;
} EFI_CC_EVENTLOG_ACPI_TABLE;

Do you agree?

Thank you
Yao Jiewen

-----Original Message-----
From: Sami Mujawar <sami.mujawar@...>
Sent: Wednesday, March 9, 2022 11:35 PM
To: Xu, Min M <min.m.xu@...>; devel@edk2.groups.io
Cc: Kinney, Michael D <michael.d.kinney@...>; Gao, Liming
<gaoliming@...>; Liu, Zhiguang <zhiguang.liu@...>; Yao,
Jiewen <jiewen.yao@...>; Wang, Jian J <jian.j.wang@...>; Lu, Ken
<ken.lu@...>; Gerd Hoffmann <kraxel@...>; nd <nd@...>;
Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@...>;
thanu.rangarajan@...
Subject: Re: [PATCH 5/8] MdePkg: Define CC Measure EventLog ACPI Table

Hi Min,

Thank you for this patch.

Please find my response inline marked [SAMI].

Regards,

Sami Mujawar


On 02/03/2022 12:28 AM, Min Xu wrote:
RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3853

TDVF set up an ACPI table (EFI_CC_EVENTLOG_ACPI_TABLE) to pass the
event-log information. The event log created by the TD owner contains
the hashes to reconstruct the MRTD and RTMR registers.

Please refer to Sec 4.3.3 in blow link:
https://www.intel.com/content/dam/develop/external/us/en/documents/
intel-tdx-guest-hypervisor-communication-interface-1.0-344426-002.pdf

Cc: Michael D Kinney <michael.d.kinney@...>
Cc: Liming Gao <gaoliming@...>
Cc: Zhiguang Liu <zhiguang.liu@...>
Cc: Jiewen Yao <jiewen.yao@...>
Cc: Jian J Wang <jian.j.wang@...>
Cc: Ken Lu <ken.lu@...>
Cc: Sami Mujawar <sami.mujawar@...>
Cc: Gerd Hoffmann <kraxel@...>
Signed-off-by: Min Xu <min.m.xu@...>
---
MdePkg/Include/Protocol/CcMeasurement.h | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

diff --git a/MdePkg/Include/Protocol/CcMeasurement.h
b/MdePkg/Include/Protocol/CcMeasurement.h
index 83eaafaf10a6..86de226c1d82 100644
--- a/MdePkg/Include/Protocol/CcMeasurement.h
+++ b/MdePkg/Include/Protocol/CcMeasurement.h
@@ -307,4 +307,24 @@ extern EFI_GUID gEfiCcFinalEventsTableGuid;

extern EFI_GUID gCcEventEntryHobGuid;

+//
+// Define the CC Measure EventLog ACPI Table
+//
+#pragma pack(1)
+
+typedef struct {
+ EFI_ACPI_DESCRIPTION_HEADER Header;
+ UINT32 Rsvd;
+ UINT64 Laml;
+ UINT64 Lasa;
+} EFI_CC_EVENTLOG_ACPI_TABLE;
+
+#pragma pack()
+
+//
+// Define the signature and revision of CC Measurement EventLog ACPI Table
for Td guest
+//
+#define EFI_CC_EVENTLOG_ACPI_TABLE_TD_SIGNATURE SIGNATURE_32('T',
'D', 'E', 'L')
+#define EFI_CC_EVENTLOG_ACPI_TABLE_TD_REVISION 1
[SAMI] I can see that the above macros have the _TD_ infix. Is the
intention here that each architecture shall define its own signature and
revision?
Would it be possible to make the signature generic across architectures,
e.g. "SIGNATURE_32('C', 'C', 'E', 'L')" ?
[/SAMI]
+
#endif

Join devel@edk2.groups.io to automatically receive all group messages.