public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Yao, Jiewen" <jiewen.yao@intel.com>
To: "Ni, Ray" <ray.ni@intel.com>
Cc: Brijesh Singh <brijesh.singh@amd.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>,
	James Bottomley <jejb@linux.ibm.com>,
	"Xu, Min M" <min.m.xu@intel.com>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	"Justen, Jordan L" <jordan.l.justen@intel.com>,
	Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Erdem Aktas <erdemaktas@google.com>,
	Michael Roth <Michael.Roth@amd.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>,
	Liming Gao <gaoliming@byosoft.com.cn>,
	"Liu, Zhiguang" <zhiguang.liu@intel.com>,
	"Kumar, Rahul1" <rahul1.kumar@intel.com>,
	"Dong, Eric" <eric.dong@intel.com>
Subject: Re: [PATCH v12 20/32] MdePkg: Define ConfidentialComputingGuestAttr
Date: Fri, 12 Nov 2021 03:57:41 +0000	[thread overview]
Message-ID: <CB6A05F4-8DCC-4266-9422-63B31CCA70C0@intel.com> (raw)
In-Reply-To: <BN0PR11MB56960FA8E6C8A8AB18DADCF88C959@BN0PR11MB5696.namprd11.prod.outlook.com>

thank you, Ray!

thank you!
Yao, Jiewen


> 在 2021年11月12日,上午11:19,Ni, Ray <ray.ni@intel.com> 写道:
> 
> Jiewen,
> Sure. I am ok with this.
> Acked-by: Ray Ni <ray.ni@intel.com>
> It doesn't make the code worse. Dynamic PCD was there already.
> 
> Thanks,
> Ray
> 
> 
> 
>> -----Original Message-----
>> From: Yao, Jiewen <jiewen.yao@intel.com>
>> Sent: Friday, November 12, 2021 10:29 AM
>> To: Brijesh Singh <brijesh.singh@amd.com>; Ni, Ray <ray.ni@intel.com>; devel@edk2.groups.io
>> Cc: James Bottomley <jejb@linux.ibm.com>; Xu, Min M <min.m.xu@intel.com>; Tom Lendacky
>> <thomas.lendacky@amd.com>; Justen, Jordan L <jordan.l.justen@intel.com>; Ard Biesheuvel
>> <ardb+tianocore@kernel.org>; Erdem Aktas <erdemaktas@google.com>; Michael Roth <Michael.Roth@amd.com>; Gerd
>> Hoffmann <kraxel@redhat.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Liming Gao
>> <gaoliming@byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu@intel.com>; Kumar, Rahul1 <rahul1.kumar@intel.com>; Dong,
>> Eric <eric.dong@intel.com>
>> Subject: RE: [PATCH v12 20/32] MdePkg: Define ConfidentialComputingGuestAttr
>> 
>> Brijesh and Ray
>> I don’t disagree the disadvantage of dynamic PCD.
>> However, dynamic PCD is widely used in today's solution.
>> 
>> If developers know clearly when this PCD value is finalized, then it won't be a problem.
>> 
>> Otherwise, I prefer we drop the dynamic PCD support in EDKII infrastructure. That would be a huge change!!!
>> 
>> Please note this is already *version 12*. We really need move forward.
>> I suggest we keep it as is and check in.
>> If we find problem later, we can resolve the specific issue.
>> 
>> Thank you
>> Yao Jiewen
>> 
>> 
>>> -----Original Message-----
>>> From: Brijesh Singh <brijesh.singh@amd.com>
>>> Sent: Friday, November 12, 2021 1:08 AM
>>> To: Ni, Ray <ray.ni@intel.com>; devel@edk2.groups.io
>>> Cc: brijesh.singh@amd.com; James Bottomley <jejb@linux.ibm.com>; Xu, Min M
>>> <min.m.xu@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Tom Lendacky
>>> <thomas.lendacky@amd.com>; Justen, Jordan L <jordan.l.justen@intel.com>;
>>> Ard Biesheuvel <ardb+tianocore@kernel.org>; Erdem Aktas
>>> <erdemaktas@google.com>; Michael Roth <Michael.Roth@amd.com>; Gerd
>>> Hoffmann <kraxel@redhat.com>; Kinney, Michael D
>>> <michael.d.kinney@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Liu,
>>> Zhiguang <zhiguang.liu@intel.com>; Kumar, Rahul1 <rahul1.kumar@intel.com>;
>>> Dong, Eric <eric.dong@intel.com>
>>> Subject: Re: [PATCH v12 20/32] MdePkg: Define
>>> ConfidentialComputingGuestAttr
>>> 
>>> Hi Ray,
>>> 
>>>> On 11/11/21 8:00 AM, Ni, Ray wrote:
>>>>> I don't prefer to use a dynamic PCD for passing data.
>>>>> 
>>>>> Because developers don't know when this PCD value is finalized (PCD always
>>> has a default value).
>>>> 
>>>> If the value is determined in PEI and consumed in DXE, HOB is a better choice.
>>>> If the value is determined in PEI and consumed in PEI, PPI is a better choice.
>>> (you can use PPI depex)
>>>> If the value is determined in DXE and consumed in DXE, Protocol is a better
>>> choice. (You can use Protocol depex)
>>>> 
>>> 
>>> I wish you had raised your concerns early to avoid going in this PCD
>>> direction. The PCD approach was discussed some time back. Both the
>>> SEV-SNP and TDX patches are dependent on it.
>>> 
>>> Having said so, if your preference is not to use the PCD, then it can be
>>> done after SNP and TDX patches are merged.
>>> 
>>> Jiewen/Min/Gerd thoughts?
>>> 
>>> thanks
>>> 
>>>> -----Original Message-----
>>>> From: Brijesh Singh <brijesh.singh@amd.com>
>>>> Sent: Thursday, November 11, 2021 6:15 AM
>>>> To: devel@edk2.groups.io
>>>> Cc: James Bottomley <jejb@linux.ibm.com>; Xu, Min M
>>> <min.m.xu@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Tom Lendacky
>>> <thomas.lendacky@amd.com>; Justen, Jordan L <jordan.l.justen@intel.com>;
>>> Ard Biesheuvel <ardb+tianocore@kernel.org>; Erdem Aktas
>>> <erdemaktas@google.com>; Michael Roth <Michael.Roth@amd.com>; Gerd
>>> Hoffmann <kraxel@redhat.com>; Kinney, Michael D
>>> <michael.d.kinney@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Liu,
>>> Zhiguang <zhiguang.liu@intel.com>; Ni, Ray <ray.ni@intel.com>; Kumar, Rahul1
>>> <rahul1.kumar@intel.com>; Dong, Eric <eric.dong@intel.com>; Brijesh Singh
>>> <brijesh.singh@amd.com>; Michael Roth <michael.roth@amd.com>
>>>> Subject: [PATCH v12 20/32] MdePkg: Define ConfidentialComputingGuestAttr
>>>> 
>>>> BZ:
>>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.
>>> tianocore.org%2Fshow_bug.cgi%3Fid%3D3275&amp;data=04%7C01%7Cbrijesh.
>>> singh%40amd.com%7C40483d937fa84cebe69908d9a51b9afd%7C3dd8961fe488
>>> 4e608e11a82d994e183d%7C0%7C0%7C637722360254370524%7CUnknown%7
>>> CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJ
>>> XVCI6Mn0%3D%7C1000&amp;sdata=EtT7bzDCZxsMA9sTCqISftp62QbezdoSf4k2
>>> eCfZsws%3D&amp;reserved=0
>>>> 
>>>> 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 D Kinney <michael.d.kinney@intel.com>
>>>> Cc: Liming Gao <gaoliming@byosoft.com.cn>
>>>> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
>>>> Cc: Michael Roth <michael.roth@amd.com>
>>>> Cc: Ray Ni <ray.ni@intel.com>
>>>> Cc: Rahul Kumar <rahul1.kumar@intel.com>
>>>> Cc: Eric Dong <eric.dong@intel.com>
>>>> Cc: James Bottomley <jejb@linux.ibm.com>
>>>> Cc: Min Xu <min.m.xu@intel.com>
>>>> Cc: Jiewen Yao <jiewen.yao@intel.com>
>>>> Cc: Tom Lendacky <thomas.lendacky@amd.com>
>>>> Cc: Jordan Justen <jordan.l.justen@intel.com>
>>>> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
>>>> Cc: Erdem Aktas <erdemaktas@google.com>
>>>> Cc: Gerd Hoffmann <kraxel@redhat.com>
>>>> Suggested-by: Jiewen Yao <jiewen.yao@intel.com>
>>>> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
>>>> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
>>>> ---
>>>>  MdePkg/MdePkg.dec                             |  4 +++
>>>>  .../Include/ConfidentialComputingGuestAttr.h  | 25 +++++++++++++++++++
>>>>  2 files changed, 29 insertions(+)
>>>>  create mode 100644 MdePkg/Include/ConfidentialComputingGuestAttr.h
>>>> 
>>>> diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index
>>> 8b18415b107a..cd903c35d2ff 100644
>>>> --- a/MdePkg/MdePkg.dec
>>>> +++ b/MdePkg/MdePkg.dec
>>>> @@ -2396,5 +2396,9 @@ [PcdsFixedAtBuild, PcdsPatchableInModule,
>>> PcdsDynamic, PcdsDynamicEx]
>>>>    # @Prompt FSB Clock.
>>>>    gEfiMdePkgTokenSpaceGuid.PcdFSBClock|200000000|UINT32|0x0000000c
>>>> 
>>>> +  ## This dynamic PCD indicates the memory encryption attribute of the guest.
>>>> +  # @Prompt Memory encryption attribute
>>>> +
>>> gEfiMdePkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr|0|UINT64|0x
>>>> + 0000002e
>>>> +
>>>>  [UserExtensions.TianoCore."ExtraFiles"]
>>>>    MdePkgExtra.uni
>>>> diff --git a/MdePkg/Include/ConfidentialComputingGuestAttr.h
>>> b/MdePkg/Include/ConfidentialComputingGuestAttr.h
>>>> new file mode 100644
>>>> index 000000000000..495b0df0ac33
>>>> --- /dev/null
>>>> +++ b/MdePkg/Include/ConfidentialComputingGuestAttr.h
>>>> @@ -0,0 +1,25 @@
>>>> +/** @file
>>>> +Definitions for Confidential Computing Attribute
>>>> +
>>>> +Copyright (c) 2021 AMD Inc. All rights reserved.<BR>
>>>> +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 = 0,
>>>> +
>>>> +  /* The guest is running with AMD SEV memory encryption enabled. */
>>>> +  CCAttrAmdSev      = 0x100,
>>>> +  CCAttrAmdSevEs    = 0x101,
>>>> +  CCAttrAmdSevSnp   = 0x102,
>>>> +
>>>> +  /* The guest is running with Intel TDX memory encryption enabled. */
>>>> +  CCAttrIntelTdx    = 0x200,
>>>> +} CONFIDENTIAL_COMPUTING_GUEST_ATTR;
>>>> +
>>>> +#endif
>>>> --
>>>> 2.25.1
>>>> 

  reply	other threads:[~2021-11-12  3:57 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-10 22:14 [PATCH v12 00/32] Add AMD Secure Nested Paging (SEV-SNP) support Brijesh Singh
2021-11-10 22:14 ` [PATCH v12 01/32] OvmfPkg/SecMain: move SEV specific routines in AmdSev.c Brijesh Singh
2021-11-10 22:14 ` [PATCH v12 02/32] UefiCpuPkg/MpInitLib: " Brijesh Singh
2021-11-12  1:40   ` [edk2-devel] " Ni, Ray
2021-11-10 22:14 ` [PATCH v12 03/32] OvmfPkg/ResetVector: move clearing GHCB in SecMain Brijesh Singh
2021-11-10 22:14 ` [PATCH v12 04/32] OvmfPkg/ResetVector: introduce SEV metadata descriptor for VMM use Brijesh Singh
2021-11-10 22:14 ` [PATCH v12 05/32] OvmfPkg: reserve SNP secrets page Brijesh Singh
2021-11-10 22:14 ` [PATCH v12 06/32] OvmfPkg: reserve CPUID page Brijesh Singh
2021-11-10 22:14 ` [PATCH v12 07/32] OvmfPkg/ResetVector: pre-validate the data pages used in SEC phase Brijesh Singh
2021-11-10 22:14 ` [PATCH v12 08/32] OvmfPkg/ResetVector: use SEV-SNP-validated CPUID values Brijesh Singh
2021-11-10 22:14 ` [PATCH v12 09/32] OvmfPkg/MemEncryptSevLib: add MemEncryptSevSnpEnabled() Brijesh Singh
2021-11-10 22:14 ` [PATCH v12 10/32] OvmfPkg/SecMain: register GHCB gpa for the SEV-SNP guest Brijesh Singh
2021-11-10 22:14 ` [PATCH v12 11/32] OvmfPkg/VmgExitLib: use SEV-SNP-validated CPUID values Brijesh Singh
2021-11-10 22:14 ` [PATCH v12 12/32] OvmfPkg/PlatformPei: register GHCB gpa for the SEV-SNP guest Brijesh Singh
2021-11-10 22:14 ` [PATCH v12 13/32] OvmfPkg/AmdSevDxe: do not use extended PCI config space Brijesh Singh
2021-11-10 22:14 ` [PATCH v12 14/32] OvmfPkg/MemEncryptSevLib: add support to validate system RAM Brijesh Singh
2021-11-10 22:14 ` [PATCH v12 15/32] OvmfPkg/MemEncryptSevLib: add function to check the VMPL0 Brijesh Singh
2021-11-10 22:14 ` [PATCH v12 16/32] OvmfPkg/BaseMemEncryptSevLib: skip the pre-validated system RAM Brijesh Singh
2021-11-10 22:14 ` [PATCH v12 17/32] OvmfPkg/MemEncryptSevLib: add support to validate > 4GB memory in PEI phase Brijesh Singh
2021-11-10 22:14 ` [PATCH v12 18/32] OvmfPkg/SecMain: validate the memory used for decompressing Fv Brijesh Singh
2021-11-10 22:14 ` [PATCH v12 19/32] OvmfPkg/PlatformPei: validate the system RAM when SNP is active Brijesh Singh
2021-11-10 22:14 ` [PATCH v12 20/32] MdePkg: Define ConfidentialComputingGuestAttr Brijesh Singh
2021-11-11 14:00   ` Ni, Ray
2021-11-11 17:07     ` Brijesh Singh
2021-11-12  2:28       ` Yao, Jiewen
2021-11-12  3:19         ` Ni, Ray
2021-11-12  3:57           ` Yao, Jiewen [this message]
2021-11-10 22:14 ` [PATCH v12 21/32] OvmfPkg/PlatformPei: set PcdConfidentialComputingAttr when SEV is active Brijesh Singh
2021-11-10 22:14 ` [PATCH v12 22/32] UefiCpuPkg/MpInitLib: use PcdConfidentialComputingAttr to check SEV status Brijesh Singh
2021-11-12  1:27   ` Ni, Ray
2021-11-12 12:33     ` Brijesh Singh
2021-11-12 12:59     ` James Bottomley
2021-11-10 22:14 ` [PATCH v12 23/32] UefiCpuPkg: add PcdGhcbHypervisorFeatures Brijesh Singh
2021-11-12  1:28   ` Ni, Ray
2021-11-10 22:14 ` [PATCH v12 24/32] OvmfPkg/PlatformPei: set the Hypervisor Features PCD Brijesh Singh
2021-11-10 22:14 ` [PATCH v12 25/32] MdePkg/GHCB: increase the GHCB protocol max version Brijesh Singh
2021-11-12  1:29   ` [edk2-devel] " Ni, Ray
2021-11-10 22:14 ` [PATCH v12 26/32] UefiCpuPkg/MpLib: add support to register GHCB GPA when SEV-SNP is enabled Brijesh Singh
2021-11-12  1:48   ` Ni, Ray
2021-11-12 14:32     ` Brijesh Singh
2021-11-30 11:13       ` Ni, Ray
2021-11-10 22:14 ` [PATCH v12 27/32] UefiCpuPkg/MpInitLib: use BSP to do extended topology check Brijesh Singh
2021-11-12  1:53   ` Ni, Ray
2021-11-12 14:45     ` Brijesh Singh
2021-11-10 22:14 ` [PATCH v12 28/32] OvmfPkg/MemEncryptSevLib: change the page state in the RMP table Brijesh Singh
2021-11-10 22:14 ` [PATCH v12 29/32] OvmfPkg/MemEncryptSevLib: skip page state change for Mmio address Brijesh Singh
2021-11-10 22:14 ` [PATCH v12 30/32] OvmfPkg/PlatformPei: mark cpuid and secrets memory reserved in EFI map Brijesh Singh
2021-11-10 22:14 ` [PATCH v12 31/32] OvmfPkg/AmdSev: expose the SNP reserved pages through configuration table Brijesh Singh
2021-11-10 22:14 ` [PATCH v12 32/32] UefiCpuPkg/MpInitLib: Use SEV-SNP AP Creation NAE event to launch APs Brijesh Singh
2021-11-12  2:09   ` [edk2-devel] " Ni, Ray
2021-11-12 14:25     ` Brijesh Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CB6A05F4-8DCC-4266-9422-63B31CCA70C0@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox