]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg: Add CC_GUEST_TYPE in ConfidentialComputingGuestAttr.h
authorMin Xu <min.m.xu@intel.com>
Tue, 19 Apr 2022 00:26:22 +0000 (08:26 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 19 Apr 2022 01:26:08 +0000 (01:26 +0000)
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3902

The confidential computing guest type (GUEST_TYPE) was defined in
OvmfPkg/Include/WorkArea.h. Now it is to be moved to
MdePkg/Include/ConfidentialComputingGuestAttr.h and renamed as
CC_GUEST_TYPE.

There are 2 reasons for this change.
1. CC_GUEST_TYPE is a generic definition and will be used in CcProbeLib
   which is defined in MdePkg.
2. Based on the latest edk2 coding style:
 - First character should be upper case
 - Must contain lower case characters
 - No white space characters
 - Global variable name must start with a 'g'

As the first step CC_GUEST_TYPE is defined in this patch. In the
next patch GUEST_TYPE will be deleted. This is to make sure the
bisect work correctly.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
MdePkg/Include/ConfidentialComputingGuestAttr.h

index dd2541c6dcdffe9042f089b1f9fb02b39176dfc7..44e6df8002077407cd5e9232105f752f02b4ad0b 100644 (file)
@@ -1,5 +1,5 @@
 /** @file\r
-Definitions for Confidential Computing Attribute\r
+Definitions for Confidential Computing Guest Attributes\r
 \r
 Copyright (c) 2021 AMD Inc. All rights reserved.<BR>\r
 SPDX-License-Identifier: BSD-2-Clause-Patent\r
@@ -9,6 +9,15 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #ifndef CONFIDENTIAL_COMPUTING_GUEST_ATTR_H_\r
 #define CONFIDENTIAL_COMPUTING_GUEST_ATTR_H_\r
 \r
+//\r
+// Confidential computing guest type\r
+//\r
+typedef enum {\r
+  CcGuestTypeNonEncrypted = 0,\r
+  CcGuestTypeAmdSev,\r
+  CcGuestTypeIntelTdx,\r
+} CC_GUEST_TYPE;\r
+\r
 typedef enum {\r
   /* The guest is running with memory encryption disabled. */\r
   CCAttrNotEncrypted = 0,\r