From nobody Wed Feb 11 05:59:57 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+81906+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=pass(p=none dis=none) header.from=groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 163414428136457.129488963130825; Wed, 13 Oct 2021 09:58:01 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 5aRNYY1788612x7XjByimRIX; Wed, 13 Oct 2021 09:58:00 -0700 X-Received: from NAM04-DM6-obe.outbound.protection.outlook.com (NAM04-DM6-obe.outbound.protection.outlook.com [40.107.102.66]) by mx.groups.io with SMTP id smtpd.web12.120.1634144279536449003 for ; Wed, 13 Oct 2021 09:57:59 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CSW/xihWwiZIhA+CWGH+5UnaTuDeUYHw3x+vdJkl/d0PSYLdJT5hBAWl3wbzetqMCDY89Nkbnev8L8fmaOehmMGRN2I0hB9Q/GM81KRUtXP0e9CWCIdkmM7yh/BPy7IwuvQOCUXf4xbPRa18Thhth+w9r/zCgs1s97GUebd+INxVTOU3RqVhRVzZoLZJNWjsdl7S+CM47l2S7dFOuaTPwaCEHaeckJEGtX3Fu/TqwSlP9fdTBDv8l6qqKN/54HwQB77+EkRVH/ZaGkTTj0+SRvk+U3L4ultjrHtY9ETpo3c2p6byLC0N0CZTFdbiyrmwk/tld3uI8XQi2ZwB4qP59w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=uaB8yNVdEURv+odmUtP8yoqvcpQEvjjyIo1HTDmu2Xw=; b=QaF53vCZS0WC8THGI08Z3q2bCVJilz/5q4OvGo9fihKQBnLlPyte9V8gUBWDy/R3ga83sUGmxAioiUZql1JkKw5lrs5bCw+05I1Gxlw4acwaYnIIEvRKWR0OR4GB4yvGZlHkchYVU3dw+Edzq3jboLDMg0PSGnwPlMtsBHxz35xS7XeLX+GqJbxbeinKngd/0LPqzlf/66vlYt7VYgFY6TCQQZCwNU69P14TlXosf45higFJT6Tow8BweNP7RPEjm5nzGc5AG/SVtzNYw2OQ0LAxCcAzAwFGJMkD3PfcjTQy4LDn+w3uIBd4aGqXEQ/iXTFhVVG15cV+lv0Ga/vSvA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none X-Received: from MW4PR04CA0046.namprd04.prod.outlook.com (2603:10b6:303:6a::21) by DM6PR12MB3195.namprd12.prod.outlook.com (2603:10b6:5:183::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18; Wed, 13 Oct 2021 16:57:57 +0000 X-Received: from CO1NAM11FT039.eop-nam11.prod.protection.outlook.com (2603:10b6:303:6a:cafe::1f) by MW4PR04CA0046.outlook.office365.com (2603:10b6:303:6a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.14 via Frontend Transport; Wed, 13 Oct 2021 16:57:56 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=pass action=none header.from=amd.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+81906+1787277+3901457@groups.io; helo=mail02.groups.io; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; X-Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT039.mail.protection.outlook.com (10.13.174.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4608.15 via Frontend Transport; Wed, 13 Oct 2021 16:57:56 +0000 X-Received: from sbrijesh-desktop.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Wed, 13 Oct 2021 11:57:51 -0500 From: "Brijesh Singh via groups.io" To: CC: James Bottomley , Min Xu , "Jiewen Yao" , Tom Lendacky , "Jordan Justen" , Ard Biesheuvel , Erdem Aktas , "Michael Roth" , Gerd Hoffmann , Brijesh Singh , Michael Roth , Ray Ni , Rahul Kumar , Eric Dong Subject: [edk2-devel] [PATCH v9 20/32] UefiCpuPkg: Define ConfidentialComputingGuestAttr Date: Wed, 13 Oct 2021 11:57:01 -0500 Message-ID: <20211013165713.727815-21-brijesh.singh@amd.com> In-Reply-To: <20211013165713.727815-1-brijesh.singh@amd.com> References: <20211013165713.727815-1-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d16544a0-ec47-4e17-019f-08d98e6a9b14 X-MS-TrafficTypeDiagnostic: DM6PR12MB3195: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: STKtxGhTArg1Z/x9HQLBc2apGpab3ah/h8ndRGdxWAhxgfCZr3gzna7PgDKZ39rd3hbf+ky22XK2HyMTK9pfvV5DUnkTaf0S4VwenbClfWGX3hv3gNE1LBwtlQ2VvHLPfq8kB6NE7Cx4mNYehh7pz4ko0FhAE+GEy6rKTHnmHtDqxl7DODGWCxd2ypUF7ar6ioooElNEoPNNTSCI2kpdmSktPtUp5Bx2H8bo+wH/9tGJYU/s8QqIGVh1ZBtVr1rj5v63ylF0Q9R97ShePFf5oAxMTWEzqXPTIB7MySicJNkeh5piG6Zgb+nusdI+bFCIaU75hzV5PsudqqjCoBReoSbPgqunsBjF6Vx78pzIMTHl6w4kSWdQ4kQfNM1LtSm6JbUIhCZ4up5IHw7TOOT0eqQn/y/EpP9lKNEpRoegW8n6ABOiF1YqFKFq6MAv3JhOKkYcHyMNqZVLunstzfjY9qrTEARtkfkmfXgzyalcyo3WhLUvziZyG0zgy09wKG/kereVyQEc14zDe5UqAwZC+g5Fl+eqTXaiPMKGqw9+dK63dbwJRumNV9/mBy3FluasvF43SPnIDzfNdMTLfsmeh7AeVOMRjroiwk9B0CuhrmRlMM/+tazFIyw5ok/LfAp0AwPUF7RbeIO2ihDbSESD61S4wTYuGr2JokiibePMhXJLTzzBtArqwTSG0nkHIbNuN5x8SLGppmd+xBXLT6+tnQpDtWZMp/ZE4vYZpxj18phOrjX9JS6NBxAWOATR3bmy/4V7EKt1EbXnZhgkUqScHXwWJu6agV0+LxclqyCtEo/xMPt9TkoFVo/9G98kpbIV X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2021 16:57:56.7583 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d16544a0-ec47-4e17-019f-08d98e6a9b14 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT039.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3195 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,brijesh.singh@amd.com X-Gm-Message-State: Pf1a9Hz5I5s5rJnsgtDIoC1Xx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1634144280; bh=U+60JmyAOKdqRVA1y7cCeNBVmGImehZULzqGwpCiOuA=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=U/NkFK4tkFjL/hK26HhDVi4ZwkkXzXhnNVpdUP2pHqvWqj19KP17ZGkFzmnyoICn9q6 67/5h57P2syDMO0IT8/zU3TBN3PiOqGCYfjnERdte2pmjzUxwlHAiGu6UNvLms4ItaAeP UKKQbW9FZNlzdaoCAfpN7Hp1xRdXo1vtz/M= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1634144283049100014 Content-Type: text/plain; charset="utf-8" BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3275 While initializing APs, the MpInitLib may need to know whether the guest is running with active AMD SEV or Intel TDX memory encryption. Add a new ConfidentialComputingGuestAttr PCD that can be used to query the memory encryption attribute. Cc: Michael Roth Cc: Ray Ni Cc: Rahul Kumar Cc: Eric Dong Cc: James Bottomley Cc: Min Xu Cc: Jiewen Yao Cc: Tom Lendacky Cc: Jordan Justen Cc: Ard Biesheuvel Cc: Erdem Aktas Cc: Gerd Hoffmann Suggested-by: Jiewen Yao Signed-off-by: Brijesh Singh --- UefiCpuPkg/UefiCpuPkg.dec | 4 +++ .../Include/ConfidentialComputingGuestAttr.h | 25 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 UefiCpuPkg/Include/ConfidentialComputingGuestAttr.h diff --git a/UefiCpuPkg/UefiCpuPkg.dec b/UefiCpuPkg/UefiCpuPkg.dec index 62acb291f309..9dbaa407c399 100644 --- a/UefiCpuPkg/UefiCpuPkg.dec +++ b/UefiCpuPkg/UefiCpuPkg.dec @@ -396,5 +396,9 @@ [PcdsDynamic, PcdsDynamicEx] # @Prompt SEV-ES Status gUefiCpuPkgTokenSpaceGuid.PcdSevEsIsEnabled|FALSE|BOOLEAN|0x60000016 =20 + ## This dynamic PCD indicates the memory encryption attribute of the gue= st. + # @Prompt Memory encryption attribute + gUefiCpuPkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr|0|UINT64|0x6= 0000017 + [UserExtensions.TianoCore."ExtraFiles"] UefiCpuPkgExtra.uni diff --git a/UefiCpuPkg/Include/ConfidentialComputingGuestAttr.h b/UefiCpuP= kg/Include/ConfidentialComputingGuestAttr.h new file mode 100644 index 000000000000..495b0df0ac33 --- /dev/null +++ b/UefiCpuPkg/Include/ConfidentialComputingGuestAttr.h @@ -0,0 +1,25 @@ +/** @file +Definitions for Confidential Computing Attribute + +Copyright (c) 2021 AMD Inc. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef CONFIDENTIAL_COMPUTING_GUEST_ATTR_H_ +#define CONFIDENTIAL_COMPUTING_GUEST_ATTR_H_ + +typedef enum { + /* The guest is running with memory encryption disabled. */ + CCAttrNotEncrypted =3D 0, + + /* The guest is running with AMD SEV memory encryption enabled. */ + CCAttrAmdSev =3D 0x100, + CCAttrAmdSevEs =3D 0x101, + CCAttrAmdSevSnp =3D 0x102, + + /* The guest is running with Intel TDX memory encryption enabled. */ + CCAttrIntelTdx =3D 0x200, +} CONFIDENTIAL_COMPUTING_GUEST_ATTR; + +#endif --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#81906): https://edk2.groups.io/g/devel/message/81906 Mute This Topic: https://groups.io/mt/86292904/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-