<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi, Vishal<o:p></o:p></p>
<p class="MsoNormal">TESTED_MEMORY_ATTRIBUTES is expected to be set by host VMM. Please see [TDVF] Table 7-1<o:p></o:p></p>
<p class="MsoNormal">[TDVF] <a href="https://www.intel.com/content/dam/develop/external/us/en/documents/tdx-virtual-firmware-design-guide-rev-1.01.pdf">
https://www.intel.com/content/dam/develop/external/us/en/documents/tdx-virtual-firmware-design-guide-rev-1.01.pdf</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Below is the TDVF log (in the very beginning).<o:p></o:p></p>
<p class="MsoNormal">   1 Intel Tdx Started with (GPAW: 52, Cpus: 8)<o:p></o:p></p>
<p class="MsoNormal">   2 <o:p></o:p></p>
<p class="MsoNormal">   3 ResourceType: 0x0                       <span style="font-family:Wingdings">ß</span> EFI_RESOURCE_SYSTEM_MEMORY<o:p></o:p></p>
<p class="MsoNormal">   4 ResourceAttribute: 0x4000007  <span style="font-family:Wingdings">
ß</span> 7 is TESTED_MEMORY_ATTRIBUTES<o:p></o:p></p>
<p class="MsoNormal">   5 PhysicalStart: 0x0<o:p></o:p></p>
<p class="MsoNormal">   6 ResourceLength: 0x800000<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">TransferTdxHobList just copy the ResourceAttribute from host Vmm.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In your mail you mentioned “Function CoreInitializeMemoryServices (from ./MdeModulePkg/Core/Dxe/Gcd/Gcd.c) is not able to find any resources with TESTED_MEMORY_ATTRIBUTES set”.  Can you explain more about it? Have you added some logs?
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> devel@edk2.groups.io <devel@edk2.groups.io> <b>
On Behalf Of </b>Vishal Annapurve via groups.io<br>
<b>Sent:</b> Friday, January 14, 2022 3:19 AM<br>
<b>To:</b> Xu, Min M <min.m.xu@intel.com>; devel@edk2.groups.io<br>
<b>Subject:</b> Re: [edk2-devel] [PATCH V4 22/31] OvmfPkg: Update PlatformPei to support TDX<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi Min,<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">+/**<br>
+ Transfer the incoming HobList for the TD to the final HobList for Dxe.<br>
+ The Hobs transferred in this function are ResourceDescriptor hob and<br>
+ MemoryAllocation hob.<br>
+<br>
+ @param[in] VmmHobList The Hoblist pass the firmware<br>
+<br>
+**/<br>
+VOID<br>
+EFIAPI<br>
+TransferTdxHobList (<br>
+ VOID<br>
+ )<br>
+{<br>
+ EFI_PEI_HOB_POINTERS Hob;<br>
+ EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute;<br>
+<br>
+ //<br>
+ // PcdOvmfSecGhcbBase is used as the TD_HOB in Tdx guest.<br>
+ //<br>
+ Hob.Raw = (UINT8 *)(UINTN)PcdGet32 (PcdOvmfSecGhcbBase);<br>
+ while (!END_OF_HOB_LIST (Hob)) {<br>
+ switch (Hob.Header->HobType) {<br>
+ case EFI_HOB_TYPE_RESOURCE_DESCRIPTOR:<br>
+ ResourceAttribute = Hob.ResourceDescriptor->ResourceAttribute;<br>
+<o:p></o:p></p>
</blockquote>
<p class="MsoNormal">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 resources in TD HOB list (Originally populated by VMM) as is to DXE phase,<br>
Function CoreInitializeMemoryServices (from ./MdeModulePkg/Core/Dxe/Gcd/Gcd.c) is not able to find any resources with TESTED_MEMORY_ATTRIBUTES set.<br>
<br>
For config A, Is there an expectation from VMM to set TESTED_MEMORY_ATTRIBUTES for each System Memory resource passed via TD HOB list or should this function<br>
be appending TESTED_MEMORY_ATTRIBUTES to existing resource attributes?<br>
<br>
Regards,<br>
Vishal <o:p></o:p></p>
<div>
<p class="MsoNormal"></o:p></span></p>
</div>
</div>
</div>
</body>
</html>


 <div width="1" style="color:white;clear:both">_._,_._,_</div> <hr>   Groups.io Links:<p>   You receive all messages sent to this group.    <p> <a target="_blank" href="https://edk2.groups.io/g/devel/message/85692">View/Reply Online (#85692)</a> |    |  <a target="_blank" href="https://groups.io/mt/87696595/1813853">Mute This Topic</a>  | <a href="https://edk2.groups.io/g/devel/post">New Topic</a><br>    <a href="https://edk2.groups.io/g/devel/editsub/1813853">Your Subscription</a> | <a href="mailto:devel+owner@edk2.groups.io">Contact Group Owner</a> |  <a href="https://edk2.groups.io/g/devel/unsub">Unsubscribe</a>  [edk2-devel-archive@redhat.com]<br> <div width="1" style="color:white;clear:both">_._,_._,_</div>