<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: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=us-ascii">
<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:"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.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@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">I recommend you split the patch set to OvmfPkg update and UefiPkg update, unless there is strong reason that you have to mix them together.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">With that, I can merge the OvmfPkg at first and we can move forward there, while waiting UefiPkg review.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">If you agree, please rebase and resubmit.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thank you<o:p></o:p></p>
<p class="MsoNormal">Yao Jiewen<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> Singh, Brijesh <brijesh.singh@amd.com> <br>
<b>Sent:</b> Monday, November 8, 2021 10:11 AM<br>
<b>To:</b> Yao, Jiewen <jiewen.yao@intel.com>; devel@edk2.groups.io; Singh, Brijesh <brijesh.singh@amd.com><br>
<b>Cc:</b> James Bottomley <jejb@linux.ibm.com>; Xu, Min M <min.m.xu@intel.com>; Lendacky, Thomas <Thomas.Lendacky@amd.com>; Justen, Jordan L <jordan.l.justen@intel.com>; Ard Biesheuvel <ardb+tianocore@kernel.org>; Erdem Aktas <erdemaktas@google.com>; Roth,
 Michael <Michael.Roth@amd.com>; Gerd Hoffmann <kraxel@redhat.com>; Ni, Ray <ray.ni@intel.com>; Kumar, Rahul1 <rahul1.kumar@intel.com><br>
<b>Subject:</b> Re: [edk2-devel] [PATCH v11 00/32] Add AMD Secure Nested Paging (SEV-SNP) support<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p style="margin:5.0pt"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">[AMD Official Use Only]<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Hi,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">I am not getting any response from the UefiCpuPkg maintainers,  I am not sure if the Ray/Rahul are on vacation or need more information.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Jiewen and Gerd,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Any recommendations how we proceed further ? I can send the rebased version and we can go ahead and commit it. If UefiCpuPkg maintainer does not like something, then I am always happy to rework
 the stuff after the commit. I would like to send some cleanup patches post SNP series that will simplify some of the MemEncryptIs{Sev,Es,Snp}Enabled() based on our recent workarea patches. It will also help/align with the TDX series.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">-Brijesh<o:p></o:p></span></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black">
<a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a> <<a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a>> on behalf of Brijesh Singh via groups.io <<a href="mailto:brijesh.singh=amd.com@groups.io">brijesh.singh=amd.com@groups.io</a>><br>
<b>Sent:</b> Sunday, October 31, 2021 4:40 PM<br>
<b>To:</b> Yao, Jiewen <<a href="mailto:jiewen.yao@intel.com">jiewen.yao@intel.com</a>>;
<a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a> <<a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a>><br>
<b>Cc:</b> Singh, Brijesh <<a href="mailto:brijesh.singh@amd.com">brijesh.singh@amd.com</a>>; James Bottomley <<a href="mailto:jejb@linux.ibm.com">jejb@linux.ibm.com</a>>; Xu, Min M <<a href="mailto:min.m.xu@intel.com">min.m.xu@intel.com</a>>; Lendacky, Thomas
 <<a href="mailto:Thomas.Lendacky@amd.com">Thomas.Lendacky@amd.com</a>>; Justen, Jordan L <<a href="mailto:jordan.l.justen@intel.com">jordan.l.justen@intel.com</a>>; Ard Biesheuvel <<a href="mailto:ardb+tianocore@kernel.org">ardb+tianocore@kernel.org</a>>;
 Erdem Aktas <<a href="mailto:erdemaktas@google.com">erdemaktas@google.com</a>>; Roth, Michael <<a href="mailto:Michael.Roth@amd.com">Michael.Roth@amd.com</a>>; Gerd Hoffmann <<a href="mailto:kraxel@redhat.com">kraxel@redhat.com</a>>; Ray Ni <<a href="mailto:ray.ni@intel.com">ray.ni@intel.com</a>>;
 Rahul Kumar <<a href="mailto:rahul1.kumar@intel.com">rahul1.kumar@intel.com</a>><br>
<b>Subject:</b> Re: [edk2-devel] [PATCH v11 00/32] Add AMD Secure Nested Paging (SEV-SNP) support</span>
<o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi Ray and Rahul,<br>
<br>
Gentle ping. Could you please Ack or R-b the files touched in UefiCpuPkg?<br>
<br>
-Brijesh<br>
<br>
On 10/29/21 9:52 AM, Brijesh Singh wrote:<br>
> Hi Jiewen,<br>
><br>
> I have not heard anything back from UefiCpuPkg maintainer yet, I will<br>
> send another gentle ping on Monday again and hope maintainer get to it.<br>
><br>
> -Brijesh<br>
><br>
> On 10/29/21 7:26 AM, Yao, Jiewen wrote:<br>
>> Hi Brijesh<br>
>> Have you got R-B from UefiCpuPkg maintainer?<br>
>><br>
>><br>
>><br>
>>> -----Original Message-----<br>
>>> From: Brijesh Singh <<a href="mailto:brijesh.singh@amd.com">brijesh.singh@amd.com</a>><br>
>>> Sent: Monday, October 25, 2021 7:54 AM<br>
>>> To: <a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a>; Yao, Jiewen <<a href="mailto:jiewen.yao@intel.com">jiewen.yao@intel.com</a>><br>
>>> Cc: <a href="mailto:brijesh.singh@amd.com">brijesh.singh@amd.com</a>; James Bottomley <<a href="mailto:jejb@linux.ibm.com">jejb@linux.ibm.com</a>>; Xu, Min M<br>
>>> <<a href="mailto:min.m.xu@intel.com">min.m.xu@intel.com</a>>; Tom Lendacky <<a href="mailto:thomas.lendacky@amd.com">thomas.lendacky@amd.com</a>>; Justen,<br>
>>> Jordan L <<a href="mailto:jordan.l.justen@intel.com">jordan.l.justen@intel.com</a>>; Ard Biesheuvel<br>
>>> <<a href="mailto:ardb+tianocore@kernel.org">ardb+tianocore@kernel.org</a>>; Erdem Aktas <<a href="mailto:erdemaktas@google.com">erdemaktas@google.com</a>>;<br>
>>> Michael Roth <<a href="mailto:Michael.Roth@amd.com">Michael.Roth@amd.com</a>>; Gerd Hoffmann <<a href="mailto:kraxel@redhat.com">kraxel@redhat.com</a>><br>
>>> Subject: Re: [edk2-devel] [PATCH v11 00/32] Add AMD Secure Nested Paging<br>
>>> (SEV-SNP) support<br>
>>><br>
>>> Thank Jiewen,<br>
>>><br>
>>> I have ping'ed UefiCpuPkg maintainer (Ray and Rahul) on every patch<br>
>>> which touches the UefiCpuPkg. If maintainer wants me to rework on<br>
>>> something then I will work accordingly. If they are okay with v11 then<br>
>>> now the merge will create a conflict (due to the TDX patches merge<br>
>>> commit). I have rebased my series to the recent master and have pushed<br>
>>> it here: <a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAMDESE%2Fovmf%2Ftree%2Fsnp-v12&amp;data=04%7C01%7Cbrijesh.singh%40amd.com%7C400c84b654c6423f739e08d99cb72382%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637713132658929026%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=loCp%2FptHiWgvAtdp6zjDH5jDeq9mKLYBwedNU%2FT0IzM%3D&amp;reserved=0">
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAMDESE%2Fovmf%2Ftree%2Fsnp-v12&amp;data=04%7C01%7Cbrijesh.singh%40amd.com%7C400c84b654c6423f739e08d99cb72382%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637713132658929026%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=loCp%2FptHiWgvAtdp6zjDH5jDeq9mKLYBwedNU%2FT0IzM%3D&amp;reserved=0</a>.
 I can post the<br>
>>> series if you prefer it.<br>
>>><br>
>>> thanks<br>
>>><br>
>>> On 10/23/21 8:46 PM, Yao, Jiewen via groups.io wrote:<br>
>>>> Yes. I will try my best to merge.<br>
>>>><br>
>>>> I checked the patch set but I did not find the "R-B" from UefiCpuPkg<br>
>>> maintainer. Neither from email nor from you v11.<br>
>>>> Did I miss something?<br>
>>>><br>
>>>> Thank you<br>
>>>> Yao Jiewen<br>
>>>><br>
>>>><br>
>>>>> -----Original Message-----<br>
>>>>> From: Brijesh Singh <<a href="mailto:brijesh.singh@amd.com">brijesh.singh@amd.com</a>><br>
>>>>> Sent: Saturday, October 23, 2021 12:13 PM<br>
>>>>> To: <a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a><br>
>>>>> Cc: James Bottomley <<a href="mailto:jejb@linux.ibm.com">jejb@linux.ibm.com</a>>; Xu, Min M<br>
>>> <<a href="mailto:min.m.xu@intel.com">min.m.xu@intel.com</a>>;<br>
>>>>> Yao, Jiewen <<a href="mailto:jiewen.yao@intel.com">jiewen.yao@intel.com</a>>; Tom Lendacky<br>
>>>>> <<a href="mailto:thomas.lendacky@amd.com">thomas.lendacky@amd.com</a>>; Justen, Jordan L <<a href="mailto:jordan.l.justen@intel.com">jordan.l.justen@intel.com</a>>;<br>
>>>>> Ard Biesheuvel <<a href="mailto:ardb+tianocore@kernel.org">ardb+tianocore@kernel.org</a>>; Erdem Aktas<br>
>>>>> <<a href="mailto:erdemaktas@google.com">erdemaktas@google.com</a>>; Michael Roth <<a href="mailto:Michael.Roth@amd.com">Michael.Roth@amd.com</a>>; Gerd<br>
>>>>> Hoffmann <<a href="mailto:kraxel@redhat.com">kraxel@redhat.com</a>>; Brijesh Singh <<a href="mailto:brijesh.singh@amd.com">brijesh.singh@amd.com</a>><br>
>>>>> Subject: [PATCH v11 00/32] Add AMD Secure Nested Paging (SEV-SNP)<br>
>>> support<br>
>>>>> Hi Gerd and Jiewen,<br>
>>>>><br>
>>>>> CI was a bit unstable during my v10 submission, so, I was not able to<br>
>>>>> run it to the completion. Finally, I managed to get the CI going,<br>
>>>>> and it reported few Windows 32-bit build errors. The v11 fixes those build<br>
>>>>> errors. Please consider this for the merge.<br>
>>>>><br>
>>>>> Thank you so much for all your support in reviewing the series.<br>
>>>>><br>
>>>>> -----------------------------------------------------------------------------<br>
>>>>> BZ:<br>
>>> <a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla">
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla</a>.<br>
>>> tianocore.org%2Fshow_bug.cgi%3Fid%3D3275&amp;data=04%7C01%7Cbrijesh.<br>
>>> singh%40amd.com%7Cddc5570780ff4a91d0da08d9969026e2%7C3dd8961fe488<br>
>>> 4e608e11a82d994e183d%7C0%7C0%7C637706369230826414%7CUnknown%7<br>
>>> CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJ<br>
>>> XVCI6Mn0%3D%7C3000&amp;sdata=L41krO6G221HaIsG92FloIzgCDqMLAAsU26<br>
>>> jaEMF7yw%3D&amp;reserved=0<br>
>>>>> SEV-SNP builds upon existing SEV and SEV-ES functionality while adding<br>
>>>>> new hardware-based memory protections. SEV-SNP adds strong memory<br>
>>>>> integrity<br>
>>>>> protection to help prevent malicious hypervisor-based attacks like data<br>
>>>>> replay, memory re-mapping and more in order to create an isolated memory<br>
>>>>> encryption environment.<br>
>>>>><br>
>>>>> This series provides the basic building blocks to support booting the SEV-SNP<br>
>>>>> VMs, it does not cover all the security enhancement introduced by the SEV-<br>
>>> SNP<br>
>>>>> such as interrupt protection.<br>
>>>>><br>
>>>>> Many of the integrity guarantees of SEV-SNP are enforced through a new<br>
>>>>> structure called the Reverse Map Table (RMP). Adding a new page to SEV-SNP<br>
>>>>> VM requires a 2-step process. First, the hypervisor assigns a page to the<br>
>>>>> guest using the new RMPUPDATE instruction. This transitions the page to<br>
>>>>> guest-invalid. Second, the guest validates the page using the new PVALIDATE<br>
>>>>> instruction. The SEV-SNP VMs can use the new "Page State Change Request<br>
>>>>> NAE"<br>
>>>>> defined in the GHCB specification to ask hypervisor to add or remove page<br>
>>>>> from the RMP table.<br>
>>>>><br>
>>>>> Each page assigned to the SEV-SNP VM can either be validated or unvalidated,<br>
>>>>> as indicated by the Validated flag in the page's RMP entry. There are two<br>
>>>>> approaches that can be taken for the page validation: Pre-validation and<br>
>>>>> Lazy Validation.<br>
>>>>><br>
>>>>> Under pre-validation, the pages are validated prior to first use. And under<br>
>>>>> lazy validation, pages are validated when first accessed. An access to a<br>
>>>>> unvalidated page results in a #VC exception, at which time the exception<br>
>>>>> handler may validate the page. Lazy validation requires careful tracking of<br>
>>>>> the validated pages to avoid validating the same GPA more than once. The<br>
>>>>> recently introduced "Unaccepted" memory type can be used to communicate<br>
>>>>> the<br>
>>>>> unvalidated memory ranges to the Guest OS.<br>
>>>>><br>
>>>>> At this time we only support the pre-validation. OVMF detects all the<br>
>>> available<br>
>>>>> system RAM in the PEI phase. When SEV-SNP is enabled, the memory is<br>
>>> validated<br>
>>>>> before it is made available to the EDK2 core.<br>
>>>>><br>
>>>>> Now that series contains all the basic support required to launch SEV-SNP<br>
>>>>> guest. We are still missing the Interrupt security feature provided by the<br>
>>>>> SNP. The feature will be added after the base support is accepted.<br>
>>>>><br>
>>>>> Additional resources<br>
>>>>> ---------------------<br>
>>>>> SEV-SNP whitepaper<br>
>>>>><br>
>>> <a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.a%2F&amp;data=04%7C01%7Cbrijesh.singh%40amd.com%7C400c84b654c6423f739e08d99cb72382%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637713132658929026%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=WznkScyKwwPKfde08y%2Fb1KTmUgVt2al9%2Bupz%2FATGOHE%3D&amp;reserved=0">
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.a%2F&amp;data=04%7C01%7Cbrijesh.singh%40amd.com%7C400c84b654c6423f739e08d99cb72382%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637713132658929026%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=WznkScyKwwPKfde08y%2Fb1KTmUgVt2al9%2Bupz%2FATGOHE%3D&amp;reserved=0</a><br>
>>> md.com%2Fsystem%2Ffiles%2FTechDocs%2FSEV-SNP-strengthening-vm-<br>
>>> &amp;data=04%7C01%7Cbrijesh.singh%40amd.com%7Cddc5570780ff4a91d0da<br>
>>> 08d9969026e2%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C63770<br>
>>> 6369230826414%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQ<br>
>>> IjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=nVMSG%<br>
>>> 2FvSS2Wa21lu1lGrHr9OYX8hL7FoAcQXBBiCztc%3D&amp;reserved=0<br>
>>>>> isolation-with-integrity-protection-and-more.pdf<br>
>>>>><br>
>>>>> APM 2:<br>
>>> <a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.a%2F&amp;data=04%7C01%7Cbrijesh.singh%40amd.com%7C400c84b654c6423f739e08d99cb72382%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637713132658929026%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=WznkScyKwwPKfde08y%2Fb1KTmUgVt2al9%2Bupz%2FATGOHE%3D&amp;reserved=0">
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.a%2F&amp;data=04%7C01%7Cbrijesh.singh%40amd.com%7C400c84b654c6423f739e08d99cb72382%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637713132658929026%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=WznkScyKwwPKfde08y%2Fb1KTmUgVt2al9%2Bupz%2FATGOHE%3D&amp;reserved=0</a><br>
>>> md.com%2Fsystem%2Ffiles%2FTechDocs%2F24593.pdf&amp;data=04%7C01%7<br>
>>> Cbrijesh.singh%40amd.com%7Cddc5570780ff4a91d0da08d9969026e2%7C3dd8<br>
>>> 961fe4884e608e11a82d994e183d%7C0%7C0%7C637706369230826414%7CUnk<br>
>>> nown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1h<br>
>>> aWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=G8Xg2glOGY2EjHpeQ3WM4gZCh<br>
>>> uI0k8QcLDTbpJiTplg%3D&amp;reserved=0 (section 15.36)<br>
>>>>> The complete source is available at<br>
>>>>><br>
>>> <a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c%2F&amp;data=04%7C01%7Cbrijesh.singh%40amd.com%7C400c84b654c6423f739e08d99cb72382%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637713132658929026%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Wx6h8FQ0289ZBQJa3iTk3Sb7zkmQO6D6VZFvRX5lEeM%3D&amp;reserved=0">
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c%2F&amp;data=04%7C01%7Cbrijesh.singh%40amd.com%7C400c84b654c6423f739e08d99cb72382%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637713132658929026%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Wx6h8FQ0289ZBQJa3iTk3Sb7zkmQO6D6VZFvRX5lEeM%3D&amp;reserved=0</a><br>
>>> om%2FAMDESE%2Fovmf%2Ftree%2Fsnp-<br>
>>> v11&amp;data=04%7C01%7Cbrijesh.singh%40amd.com%7Cddc5570780ff4a91d<br>
>>> 0da08d9969026e2%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C63<br>
>>> 7706369230826414%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiL<br>
>>> CJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=HMH<br>
>>> Fq8G%2FPqdhzNW3Ashmc4%2Bmv1RcDULD4vniofhiS54%3D&amp;reserved=0<br>
>>>>> GHCB spec:<br>
>>>>><br>
>>> <a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdevelop">
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdevelop</a><br>
>>> er.amd.com%2Fwp-<br>
>>> content%2Fresources%2F56421.pdf&amp;data=04%7C01%7Cbrijesh.singh%40a<br>
>>> md.com%7Cddc5570780ff4a91d0da08d9969026e2%7C3dd8961fe4884e608e11<br>
>>> a82d994e183d%7C0%7C0%7C637706369230826414%7CUnknown%7CTWFpbGZ<br>
>>> sb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0<br>
>>> %3D%7C3000&amp;sdata=YiPgZU87fdnl5rJpD0E2ue9aTKbqUwizuBrKxom0FiU%<br>
>>> 3D&amp;reserved=0<br>
>>>>> SEV-SNP firmware specification:<br>
>>>>><br>
>>> <a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.a%2F&amp;data=04%7C01%7Cbrijesh.singh%40amd.com%7C400c84b654c6423f739e08d99cb72382%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637713132658939021%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Hs%2BB9e%2FrZ0aYV3XPtJ9ZegaaIAMURuH1Dc9C1CeBauU%3D&amp;reserved=0">
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.a%2F&amp;data=04%7C01%7Cbrijesh.singh%40amd.com%7C400c84b654c6423f739e08d99cb72382%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637713132658939021%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Hs%2BB9e%2FrZ0aYV3XPtJ9ZegaaIAMURuH1Dc9C1CeBauU%3D&amp;reserved=0</a><br>
>>> md.com%2Fsystem%2Ffiles%2FTechDocs%2F56860.pdf&amp;data=04%7C01%7<br>
>>> Cbrijesh.singh%40amd.com%7Cddc5570780ff4a91d0da08d9969026e2%7C3dd8<br>
>>> 961fe4884e608e11a82d994e183d%7C0%7C0%7C637706369230826414%7CUnk<br>
>>> nown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1h<br>
>>> aWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=bfQsY4%2BRnlFGuD3Bg%2BFPb3l<br>
>>> RgSGgpomNocXswHqkm%2F4%3D&amp;reserved=0<br>
>>>>> Change since v10:<br>
>>>>>  * fix 'unresolved external symbol __allshl' link error when building I32 for<br>
>>>>> VS2017.<br>
>>>>><br>
>>>>> Changes since v9:<br>
>>>>>  * Move CCAttrs Pcd define in MdePkg<br>
>>>>>  * Add comment to indicate that allocating the identity map PT is temporary<br>
>>> until<br>
>>>>> we get lazy validation<br>
>>>>><br>
>>>>> Changes since v8:<br>
>>>>>  * drop the generic metadata and make it specific to SEV.<br>
>>>>><br>
>>>>> Changes since v7:<br>
>>>>>  * Move SEV specific changes in MpLib in AmdSev file<br>
>>>>>  * Update the GHCB register function to not restore the GHCB MSR because<br>
>>>>>    we were already in the MSR protocol mode.<br>
>>>>>  * Drop the SNP name from PcdSnpSecPreValidate.<br>
>>>>>  * Add new section for GHCB memory in the OVMF metadata.<br>
>>>>><br>
>>>>> Change since v6:<br>
>>>>>  * Drop the SNP boot block GUID and switch to using the Metadata guided<br>
>>>>> structure<br>
>>>>>    proposed by Min in TDX series.<br>
>>>>>  * Exclude the GHCB page from the pre-validated region. It simplifies the<br>
>>> reset<br>
>>>>>    vector code where we do not need to unvalidate the GHCB page.<br>
>>>>>  * Now that GHCB page is not validated so move the VMPL check from reset<br>
>>>>> vector<br>
>>>>>    code to the MemEncryptSevLib on the first page validation.<br>
>>>>>  * Introduce the ConfidentialComputingGuestAttr PCD to communicate which<br>
>>>>>    memory encryption is active so that MpInitLib can make use of it.<br>
>>>>>  * Drop the SEVES specific PCD as the information can be communicated via<br>
>>>>>    the ConfidentialComputingGuestAttr.<br>
>>>>>  * Move the SNP specific AP creation function in AmdSev.c.<br>
>>>>>  * Define the SNP Blob GUID in a new file.<br>
>>>>><br>
>>>>> Change since v5:<br>
>>>>>  * When possible use the CPUID value from CPUID page<br>
>>>>>  * Move the SEV specific functions from SecMain.c in AmdSev.c<br>
>>>>>  * Rebase to the latest code<br>
>>>>>  * Add the review feedback from Yao.<br>
>>>>><br>
>>>>> Change since v4:<br>
>>>>>  * Use the correct MSR for the SEV_STATUS<br>
>>>>>  * Add VMPL-0 check<br>
>>>>><br>
>>>>> Change since v3:<br>
>>>>>  * ResetVector: move all SEV specific code in AmdSev.asm and add macros to<br>
>>>>> keep<br>
>>>>>    the code readable.<br>
>>>>>  * Drop extending the EsWorkArea to contain SNP specific state.<br>
>>>>>  * Drop the GhcbGpa library and call the VmgExit directly to register GHCB<br>
>>> GPA.<br>
>>>>>  * Install the CC blob config table from AmdSevDxe instead of extending the<br>
>>>>>    AmdSev/SecretsDxe for it.<br>
>>>>>  * Add the separate PCDs for the SNP Secrets.<br>
>>>>><br>
>>>>> Changes since v2:<br>
>>>>>  * Add support for the AP creation.<br>
>>>>>  * Use the module-scoping override to make AmdSevDxe use the IO port for<br>
>>> PCI<br>
>>>>> reads.<br>
>>>>>  * Use the reserved memory type for CPUID and Secrets page.<br>
>>>>>  *<br>
>>>>> Changes since v1:<br>
>>>>>  * Drop the interval tree support to detect the pre-validated overlap region.<br>
>>>>>  * Use an array to keep track of pre-validated regions.<br>
>>>>>  * Add support to query the Hypervisor feature and verify that SNP feature is<br>
>>>>> supported.<br>
>>>>>  * Introduce MemEncryptSevClearMmioPageEncMask() to clear the C-bit<br>
>>> from<br>
>>>>> MMIO ranges.<br>
>>>>>  * Pull the SevSecretDxe and SevSecretPei into OVMF package build.<br>
>>>>>  * Extend the SevSecretDxe to expose confidential computing blob location<br>
>>>>> through<br>
>>>>>    EFI configuration table.<br>
>>>>><br>
>>>>> Brijesh Singh (28):<br>
>>>>>   OvmfPkg/SecMain: move SEV specific routines in AmdSev.c<br>
>>>>>   UefiCpuPkg/MpInitLib: move SEV specific routines in AmdSev.c<br>
>>>>>   OvmfPkg/ResetVector: move clearing GHCB in SecMain<br>
>>>>>   OvmfPkg/ResetVector: introduce SEV metadata descriptor for VMM use<br>
>>>>>   OvmfPkg: reserve SNP secrets page<br>
>>>>>   OvmfPkg: reserve CPUID page<br>
>>>>>   OvmfPkg/ResetVector: pre-validate the data pages used in SEC phase<br>
>>>>>   OvmfPkg/MemEncryptSevLib: add MemEncryptSevSnpEnabled()<br>
>>>>>   OvmfPkg/SecMain: register GHCB gpa for the SEV-SNP guest<br>
>>>>>   OvmfPkg/PlatformPei: register GHCB gpa for the SEV-SNP guest<br>
>>>>>   OvmfPkg/AmdSevDxe: do not use extended PCI config space<br>
>>>>>   OvmfPkg/MemEncryptSevLib: add support to validate system RAM<br>
>>>>>   OvmfPkg/MemEncryptSevLib: add function to check the VMPL0<br>
>>>>>   OvmfPkg/BaseMemEncryptSevLib: skip the pre-validated system RAM<br>
>>>>>   OvmfPkg/MemEncryptSevLib: add support to validate > 4GB memory in PEI<br>
>>>>>     phase<br>
>>>>>   OvmfPkg/SecMain: validate the memory used for decompressing Fv<br>
>>>>>   OvmfPkg/PlatformPei: validate the system RAM when SNP is active<br>
>>>>>   UefiCpuPkg: Define ConfidentialComputingGuestAttr<br>
>>>>>   OvmfPkg/PlatformPei: set PcdConfidentialComputingAttr when SEV is<br>
>>>>>     active<br>
>>>>>   UefiCpuPkg/MpInitLib: use PcdConfidentialComputingAttr to check SEV<br>
>>>>>     status<br>
>>>>>   UefiCpuPkg: add PcdGhcbHypervisorFeatures<br>
>>>>>   OvmfPkg/PlatformPei: set the Hypervisor Features PCD<br>
>>>>>   MdePkg/GHCB: increase the GHCB protocol max version<br>
>>>>>   UefiCpuPkg/MpLib: add support to register GHCB GPA when SEV-SNP is<br>
>>>>>     enabled<br>
>>>>>   OvmfPkg/MemEncryptSevLib: change the page state in the RMP table<br>
>>>>>   OvmfPkg/MemEncryptSevLib: skip page state change for Mmio address<br>
>>>>>   OvmfPkg/PlatformPei: mark cpuid and secrets memory reserved in EFI map<br>
>>>>>   OvmfPkg/AmdSev: expose the SNP reserved pages through configuration<br>
>>>>>     table<br>
>>>>><br>
>>>>> Michael Roth (3):<br>
>>>>>   OvmfPkg/ResetVector: use SEV-SNP-validated CPUID values<br>
>>>>>   OvmfPkg/VmgExitLib: use SEV-SNP-validated CPUID values<br>
>>>>>   UefiCpuPkg/MpInitLib: use BSP to do extended topology check<br>
>>>>><br>
>>>>> Tom Lendacky (1):<br>
>>>>>   UefiCpuPkg/MpInitLib: Use SEV-SNP AP Creation NAE event to launch APs<br>
>>>>><br>
>>>>>  MdePkg/MdePkg.dec                             |   4 +<br>
>>>>>  OvmfPkg/OvmfPkg.dec                           |  18 +<br>
>>>>>  UefiCpuPkg/UefiCpuPkg.dec                     |   5 +<br>
>>>>>  OvmfPkg/AmdSev/AmdSevX64.dsc                  |   8 +-<br>
>>>>>  OvmfPkg/Bhyve/BhyveX64.dsc                    |   5 +-<br>
>>>>>  OvmfPkg/OvmfPkgIa32.dsc                       |   4 +<br>
>>>>>  OvmfPkg/OvmfPkgIa32X64.dsc                    |   9 +-<br>
>>>>>  OvmfPkg/OvmfPkgX64.dsc                        |   8 +-<br>
>>>>>  OvmfPkg/OvmfXen.dsc                           |   5 +-<br>
>>>>>  OvmfPkg/OvmfPkgX64.fdf                        |   6 +<br>
>>>>>  OvmfPkg/AmdSevDxe/AmdSevDxe.inf               |   7 +<br>
>>>>>  .../DxeMemEncryptSevLib.inf                   |   3 +<br>
>>>>>  .../PeiMemEncryptSevLib.inf                   |   7 +<br>
>>>>>  .../SecMemEncryptSevLib.inf                   |   3 +<br>
>>>>>  OvmfPkg/Library/VmgExitLib/SecVmgExitLib.inf  |   2 +<br>
>>>>>  OvmfPkg/Library/VmgExitLib/VmgExitLib.inf     |   3 +<br>
>>>>>  OvmfPkg/PlatformPei/PlatformPei.inf           |   7 +<br>
>>>>>  OvmfPkg/ResetVector/ResetVector.inf           |   5 +<br>
>>>>>  OvmfPkg/Sec/SecMain.inf                       |   4 +<br>
>>>>>  UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf |   6 +-<br>
>>>>>  UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf |   6 +-<br>
>>>>>  .../Include/ConfidentialComputingGuestAttr.h  |  25 +<br>
>>>>>  MdePkg/Include/Register/Amd/Ghcb.h            |   2 +-<br>
>>>>>  .../Guid/ConfidentialComputingSevSnpBlob.h    |  33 ++<br>
>>>>>  OvmfPkg/Include/Library/MemEncryptSevLib.h    |  26 +<br>
>>>>>  .../X64/SnpPageStateChange.h                  |  36 ++<br>
>>>>>  .../BaseMemEncryptSevLib/X64/VirtualMemory.h  |  24 +<br>
>>>>>  OvmfPkg/PlatformPei/Platform.h                |   5 +<br>
>>>>>  OvmfPkg/Sec/AmdSev.h                          |  95 ++++<br>
>>>>>  UefiCpuPkg/Library/MpInitLib/MpLib.h          |  93 ++++<br>
>>>>>  OvmfPkg/AmdSevDxe/AmdSevDxe.c                 |  23 +<br>
>>>>>  .../DxeMemEncryptSevLibInternal.c             |  27 ++<br>
>>>>>  .../Ia32/MemEncryptSevLib.c                   |  17 +<br>
>>>>>  .../PeiMemEncryptSevLibInternal.c             |  27 ++<br>
>>>>>  .../SecMemEncryptSevLibInternal.c             |  19 +<br>
>>>>>  .../X64/DxeSnpSystemRamValidate.c             |  40 ++<br>
>>>>>  .../X64/PeiDxeVirtualMemory.c                 | 167 ++++++-<br>
>>>>>  .../X64/PeiSnpSystemRamValidate.c             | 127 +++++<br>
>>>>>  .../X64/SecSnpSystemRamValidate.c             |  82 ++++<br>
>>>>>  .../X64/SnpPageStateChangeInternal.c          | 294 ++++++++++++<br>
>>>>>  OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c | 444<br>
>>> ++++++++++++++++--<br>
>>>>>  OvmfPkg/PlatformPei/AmdSev.c                  | 231 +++++++++<br>
>>>>>  OvmfPkg/PlatformPei/MemDetect.c               |   2 +<br>
>>>>>  OvmfPkg/Sec/AmdSev.c                          | 298 ++++++++++++<br>
>>>>>  OvmfPkg/Sec/SecMain.c                         | 158 +------<br>
>>>>>  UefiCpuPkg/Library/MpInitLib/AmdSev.c         | 239 ++++++++++<br>
>>>>>  UefiCpuPkg/Library/MpInitLib/DxeMpLib.c       |  16 +-<br>
>>>>>  UefiCpuPkg/Library/MpInitLib/Ia32/AmdSev.c    |  70 +++<br>
>>>>>  UefiCpuPkg/Library/MpInitLib/MpLib.c          | 345 +++++---------<br>
>>>>>  UefiCpuPkg/Library/MpInitLib/PeiMpLib.c       |   4 +-<br>
>>>>>  UefiCpuPkg/Library/MpInitLib/X64/AmdSev.c     | 261 ++++++++++<br>
>>>>>  OvmfPkg/FvmainCompactScratchEnd.fdf.inc       |   5 +<br>
>>>>>  OvmfPkg/ResetVector/Ia16/ResetVectorVtf0.asm  |  17 +<br>
>>>>>  OvmfPkg/ResetVector/Ia32/AmdSev.asm           |  86 +++-<br>
>>>>>  OvmfPkg/ResetVector/ResetVector.nasmb         |  18 +<br>
>>>>>  OvmfPkg/ResetVector/X64/OvmfSevMetadata.asm   |  74 +++<br>
>>>>>  UefiCpuPkg/Library/MpInitLib/MpEqu.inc        |   2 +<br>
>>>>>  UefiCpuPkg/Library/MpInitLib/X64/AmdSev.nasm  | 200 ++++++++<br>
>>>>>  UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm | 100 +---<br>
>>>>>  59 files changed, 3329 insertions(+), 528 deletions(-)<br>
>>>>>  create mode 100644 MdePkg/Include/ConfidentialComputingGuestAttr.h<br>
>>>>>  create mode 100644<br>
>>>>> OvmfPkg/Include/Guid/ConfidentialComputingSevSnpBlob.h<br>
>>>>>  create mode 100644<br>
>>>>> OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpPageStateChange.h<br>
>>>>>  create mode 100644 OvmfPkg/Sec/AmdSev.h<br>
>>>>>  create mode 100644<br>
>>>>> OvmfPkg/Library/BaseMemEncryptSevLib/X64/DxeSnpSystemRamValidate.c<br>
>>>>>  create mode 100644<br>
>>>>> OvmfPkg/Library/BaseMemEncryptSevLib/X64/PeiSnpSystemRamValidate.c<br>
>>>>>  create mode 100644<br>
>>>>> OvmfPkg/Library/BaseMemEncryptSevLib/X64/SecSnpSystemRamValidate.c<br>
>>>>>  create mode 100644<br>
>>>>><br>
>>> OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpPageStateChangeInternal.c<br>
>>>>>  create mode 100644 OvmfPkg/Sec/AmdSev.c<br>
>>>>>  create mode 100644 UefiCpuPkg/Library/MpInitLib/AmdSev.c<br>
>>>>>  create mode 100644 UefiCpuPkg/Library/MpInitLib/Ia32/AmdSev.c<br>
>>>>>  create mode 100644 UefiCpuPkg/Library/MpInitLib/X64/AmdSev.c<br>
>>>>>  create mode 100644 OvmfPkg/ResetVector/X64/OvmfSevMetadata.asm<br>
>>>>>  create mode 100644 UefiCpuPkg/Library/MpInitLib/X64/AmdSev.nasm<br>
>>>>><br>
>>>>> --<br>
>>>>> 2.25.1<br>
>>>> <br>
>>>><br>
>>>><br>
<br>
<br>
<br>
<br>
<o:p></o:p></p>
</div>
</div>
</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/83426">View/Reply Online (#83426)</a> |    |  <a target="_blank" href="https://groups.io/mt/86530708/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>