From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web08.3858.1650328002343868729 for ; Mon, 18 Apr 2022 17:26:45 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=cz6unmQD; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: min.m.xu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650328004; x=1681864004; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=A6H/VazUnenDUJnbXNBc1AhXp4pgfLDHEuPPL/CyFIU=; b=cz6unmQDrhW5PWYU+9D1Q1Wk/wqzDCIxLL537SRfmg6aQgecStpNElCg OfdWInDwQHe9mRHmMA1Rh2AFGqjcv+ztCXoTWfK4IrmTdgnaWUsAv2gUU 0tf/otlm795/KJG4D+o4p6nBpE08S7QFTPil6KR9f0z/FMYVFYYGq6RWv jL9SxEY+rkrC8gKBGVga3cDC0ZoOvmZm3UEfsTm0cYZ0wp5d//VXpf29Y Z3m+TGQfNAF/fOPj97DL2KztK1F+DfLn4xN8uwZ6NCnXzwo9N+iTU5wXS zdZx4LLo/aPx6atrT2XGxCfsfI2Q1mYOji5oryHNw4O2EIAWPsdMBMQTU A==; X-IronPort-AV: E=McAfee;i="6400,9594,10321"; a="326540303" X-IronPort-AV: E=Sophos;i="5.90,271,1643702400"; d="scan'208";a="326540303" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2022 17:26:44 -0700 X-IronPort-AV: E=Sophos;i="5.90,271,1643702400"; d="scan'208";a="529079938" Received: from mxu9-mobl1.ccr.corp.intel.com ([10.249.171.121]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2022 17:26:41 -0700 From: "Min Xu" To: devel@edk2.groups.io Cc: Min Xu , Michael D Kinney , Liming Gao , Zhiguang Liu , James Bottomley , Jiewen Yao , Gerd Hoffmann , Brijesh Singh , Erdem Aktas , Tom Lendacky Subject: [PATCH V4 1/7] MdePkg: Add CC_GUEST_TYPE in ConfidentialComputingGuestAttr.h Date: Tue, 19 Apr 2022 08:26:22 +0800 Message-Id: <004da33b7bd5923c91e72ae68912b3f660bae751.1650326140.git.min.m.xu@intel.com> X-Mailer: git-send-email 2.29.2.windows.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Cc: Liming Gao Cc: Zhiguang Liu Cc: James Bottomley Cc: Jiewen Yao Cc: Gerd Hoffmann Cc: Brijesh Singh Cc: Erdem Aktas Cc: Tom Lendacky Reviewed-by: Liming Gao Reviewed-by: Jiewen Yao Reviewed-by: Tom Lendacky Signed-off-by: Min Xu --- MdePkg/Include/ConfidentialComputingGuestAttr.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/MdePkg/Include/ConfidentialComputingGuestAttr.h b/MdePkg/Include/ConfidentialComputingGuestAttr.h index dd2541c6dcdf..44e6df800207 100644 --- a/MdePkg/Include/ConfidentialComputingGuestAttr.h +++ b/MdePkg/Include/ConfidentialComputingGuestAttr.h @@ -1,5 +1,5 @@ /** @file -Definitions for Confidential Computing Attribute +Definitions for Confidential Computing Guest Attributes Copyright (c) 2021 AMD Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent @@ -9,6 +9,15 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #ifndef CONFIDENTIAL_COMPUTING_GUEST_ATTR_H_ #define CONFIDENTIAL_COMPUTING_GUEST_ATTR_H_ +// +// Confidential computing guest type +// +typedef enum { + CcGuestTypeNonEncrypted = 0, + CcGuestTypeAmdSev, + CcGuestTypeIntelTdx, +} CC_GUEST_TYPE; + typedef enum { /* The guest is running with memory encryption disabled. */ CCAttrNotEncrypted = 0, -- 2.29.2.windows.2