From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [edk2-devel] [PATCH V4 22/31] OvmfPkg: Update PlatformPei to support TDX To: Min Xu ,devel@edk2.groups.io From: "Vishal Annapurve" X-Originating-Location: Redmond, Washington, US (73.118.244.112) X-Originating-Platform: Linux Chrome 97 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Thu, 13 Jan 2022 11:18:51 -0800 References: <94bb5cbbb19bb7b14513082b386554fc59168eb4.1639399598.git.min.m.xu@intel.com> In-Reply-To: <94bb5cbbb19bb7b14513082b386554fc59168eb4.1639399598.git.min.m.xu@intel.com> Message-ID: <29605.1642101531994980536@groups.io> Content-Type: multipart/alternative; boundary="lFGXLEkleyc9YNul7c4T" --lFGXLEkleyc9YNul7c4T Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Min, >=20 > +/** > + Transfer the incoming HobList for the TD to the final HobList for Dxe. > + The Hobs transferred in this function are ResourceDescriptor hob and > + MemoryAllocation hob. > + > + @param[in] VmmHobList The Hoblist pass the firmware > + > +**/ > +VOID > +EFIAPI > +TransferTdxHobList ( > + VOID > + ) > +{ > + EFI_PEI_HOB_POINTERS Hob; > + EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute; > + > + // > + // PcdOvmfSecGhcbBase is used as the TD_HOB in Tdx guest. > + // > + Hob.Raw =3D (UINT8 *)(UINTN)PcdGet32 (PcdOvmfSecGhcbBase); > + while (!END_OF_HOB_LIST (Hob)) { > + switch (Hob.Header->HobType) { > + case EFI_HOB_TYPE_RESOURCE_DESCRIPTOR: > + ResourceAttribute =3D Hob.ResourceDescriptor->ResourceAttribute; > + I am trying to test TDX functionality with config A patches (Wave1 + Wave2.= v4) and with the above function passing the memory attributes of the resour= ces in TD HOB list (Originally populated by VMM) as is to DXE phase, Function CoreInitializeMemoryServices (from ./MdeModulePkg/Core/Dxe/Gcd/Gcd= .c) is not able to find any resources with=C2=A0TESTED_MEMORY_ATTRIBUTES=C2= =A0set. For config A, Is there an expectation from VMM to set=C2=A0TESTED_MEMORY_AT= TRIBUTES for each System Memory resource passed via TD HOB list or should t= his function be appending=C2=A0TESTED_MEMORY_ATTRIBUTES to existing resource attributes? Regards, Vishal --lFGXLEkleyc9YNul7c4T Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Min,

+/**
+ Transfer the incoming HobList for the TD to the fin= al HobList for Dxe.
+ The Hobs transferred in this function are Resour= ceDescriptor hob and
+ MemoryAllocation hob.
+
+ @param[in] = VmmHobList The Hoblist pass the firmware
+
+**/
+VOID
+= EFIAPI
+TransferTdxHobList (
+ VOID
+ )
+{
+ EFI_P= EI_HOB_POINTERS Hob;
+ EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute;<= br />+
+ //
+ // PcdOvmfSecGhcbBase is used as the TD_HOB in Tdx = guest.
+ //
+ Hob.Raw =3D (UINT8 *)(UINTN)PcdGet32 (PcdOvmfSecGhc= bBase);
+ while (!END_OF_HOB_LIST (Hob)) {
+ switch (Hob.Header-&= gt;HobType) {
+ case EFI_HOB_TYPE_RESOURCE_DESCRIPTOR:
+ Resource= Attribute =3D Hob.ResourceDescriptor->ResourceAttribute;
+ I am trying to test TDX functionality with config A patches (Wave1 + Wave2.= v4) and with the above function passing the memory attributes of the resour= ces in TD HOB list (Originally populated by VMM) as is to DXE phase,
F= unction CoreInitializeMemoryServices (from ./MdeModulePkg/Core/Dxe/Gcd/Gcd.= c) is not able to find any resources with TESTED_MEMORY_ATTRIBUTES&nbs= p;set.

For config A, Is there an expectation from VMM to set&nbs= p;TESTED_MEMORY_ATTRIBUTES for each System Memory resource passed via TD HO= B list or should this function
be appending TESTED_MEMORY_ATTRIBU= TES to existing resource attributes?

Regards,
Vishal --lFGXLEkleyc9YNul7c4T--