From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web08.1927.1649981244283090489 for ; Thu, 14 Apr 2022 17:07:27 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=SI0syr1u; spf=pass (domain: intel.com, ip: 134.134.136.24, 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=1649981246; x=1681517246; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=28yF+2bqFSrS/gVijJ0gC2sfgbJTfdXEVNDxsLwFtpU=; b=SI0syr1uoQfzKH50ov+/pCp2uXKd8IJ8YLby1Xjvm0jhwbpuu/5foD5Q tRUDuYtflR/6++gLo9aUR+1pG3CcVTWjywQakDRL1qgVdl9njULfZc3nr NAiVumaiPJfZDEtOtov5b70PVJDQxOdwMqmZqGYRo23anGmvbSHTBvncV 78mTtEOMYQdD5TA4x6RP+ztvF1xzXVW8J3F6ZoV2Su5Qvo0j9Ec2s+Rz8 iWFeoPMtWQ3CVd69+IR98sdX7PFGva8qADChXRZr0fczd8Nlo2PxMpvwx uMfrffWdwA3FKzduEEDg9AYv4j7qvSFYOnOFrd2vCDnk7jCq9vpdJRzbm w==; X-IronPort-AV: E=McAfee;i="6400,9594,10317"; a="262504536" X-IronPort-AV: E=Sophos;i="5.90,261,1643702400"; d="scan'208";a="262504536" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2022 17:07:26 -0700 X-IronPort-AV: E=Sophos;i="5.90,261,1643702400"; d="scan'208";a="552923258" Received: from mxu9-mobl1.ccr.corp.intel.com ([10.249.168.38]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2022 17:07:23 -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 V2 1/6] MdePkg: Add CC_GUEST_TYPE in ConfidentialComputingGuestAttr.h Date: Fri, 15 Apr 2022 08:07:04 +0800 Message-Id: <38fa3ea81c23cae2ba866f7be35531166bffe8a0.1649980548.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 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..9e9424a01559 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