From: Min M Xu <min.m...@intel.com>

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4335

CcMeasurement protocol is installed when it is supported in a td-guest. If
the installation of the protocol failed, the guest shall go into
CpuDeadLoop. Because the measurement feature is crucial to a td-guest and
it shall stop running immediately at this situation.

Cc: Jiewen Yao <jiewen....@intel.com>
Cc: Jian J Wang <jian.j.w...@intel.com>
Signed-off-by: Min Xu <min.m...@intel.com>
---
 SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c 
b/SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c
index 59341a8c0250..b34da724ac42 100644
--- a/SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c
+++ b/SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c
@@ -2510,6 +2510,12 @@ DriverEntry (
     //
     // Create event callback to install CC EventLog ACPI Table
     EfiCreateProtocolNotifyEvent (&gEfiAcpiTableProtocolGuid, TPL_CALLBACK, 
InstallAcpiTable, NULL, &Registration);
+  } else {
+    //
+    // Cc measurement feature is crucial to a td-guest and it shall stop 
running immediately
+    // when it is failed to be installed.
+    DEBUG ((DEBUG_ERROR, "%a: CcMeasurement protocol failed to be installed - 
%r\n", __FUNCTION__, Status));
+    CpuDeadLoop ();
   }
 
   return Status;
-- 
2.29.2.windows.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#99442): https://edk2.groups.io/g/devel/message/99442
Mute This Topic: https://groups.io/mt/96696665/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to