<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/OvmfPkg/Sec, branch dependabot/github_actions/actions/setup-python-6</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Factions%2Fsetup-python-6</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Factions%2Fsetup-python-6'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2025-02-07T02:23:11+00:00</updated>
<entry>
<title>MdePkg: Move StackCheckLibStaticInit to StackCheckLib</title>
<updated>2025-02-07T02:23:11+00:00</updated>
<author>
<name>Oliver Smith-Denny</name>
<email>osde@microsoft.com</email>
</author>
<published>2025-01-29T19:01:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=efbf5ed08c48478b51bb6b6da5670b1312755854'/>
<id>urn:sha1:efbf5ed08c48478b51bb6b6da5670b1312755854</id>
<content type='text'>
This commit oves StackCheckLib from a NULL lib to an instance of
StackCheckLib. This requires every entry point to add a library
dependency on StackCheckLib. It also requires every SEC module
to have a dependency on StackCheckLib because there is no
standard SEC entry point.

It allows for greater flexibility for a platform to apply stack
cookies and simplifies DSC logic.

Continuous-integration-options: PatchCheck.ignore-multi-package

Signed-off-by: Oliver Smith-Denny &lt;osde@microsoft.com&gt;
</content>
</entry>
<entry>
<title>OvmfPkg/Sec: Skip setup MTRR early in TD-Guest</title>
<updated>2024-07-11T03:24:26+00:00</updated>
<author>
<name>Ceping Sun</name>
<email>cepingx.sun@intel.com</email>
</author>
<published>2024-07-01T17:50:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=071d2cfab8347e396c8b2709bfb588a18c497bbd'/>
<id>urn:sha1:071d2cfab8347e396c8b2709bfb588a18c497bbd</id>
<content type='text'>
With the commit ce4c76e (“OvmfPkg/Sec: Setup MTRR early
in the boot process.”), we find an unexpected #VE is triggered
in TD-Guest.

The background of importing the above commit is that:
Before running lzma uncompress of the main firmware volume,
if not correctly set MTRR, that would make the uncompress be
extremely slow.
Detailed discussion info can refer to below links:
https://edk2.groups.io/g/devel/message/114202
https://edk2.groups.io/g/devel/message/114977

Refer to [intel-tdx-module-1.5-base-spec] Section 11.3 and
section11.6.1, CR0.CD is enforced to 0 in TD-Guest.
And refer to section 18.2.1.4,  TDX module MTRR emulation
enforces WB in VMM.

Currently the initial MTRR are:
- Td-Guest     :  MTRR disabled, Type is WB.
- Non-Td-Guest :  MTRR disabled, Type is UC.

In DXE phase, OVMF/TDVF would check the MTRR Type for MMIO
(in CpuSetMemoryAttributes -&gt; MtrrGetMemoryAttribute -&gt;
MtrrGetMemoryAttributeworker:
https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/Library/MtrrLib/MtrrLib.c#L929
).
If MTRR is disabled, it always returns UC. Otherwise, it returns
the actual value.

If it checks that the type is not UC then the MTRR is programmed.
It is required to disable cache by setting CR0.CD to 1. That will trigger
an unexpected #VE in TD-Guest.

Based on above analysis we propose to skip "Setup MTRR early" in
TD-Guest because of:
- TD-Guest doesn’t have the issue that lzma uncompress extremely slow.
- This patch will trigger an unexpected #VE in TD-Guest.

intel-tdx-module-1.5-base-spec:
https://cdrdv2.intel.com/v1/dl/getContent/733575

Cc: Erdem Aktas &lt;erdemaktas@google.com&gt;
Cc: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Cc: Min Xu &lt;min.m.xu@intel.com&gt;
Cc: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Cc: Elena Reshetova &lt;elena.reshetova@intel.com&gt;
Signed-off-by: Ceping Sun &lt;cepingx.sun@intel.com&gt;
</content>
</entry>
<entry>
<title>OvmfPkg/Sec: use cache type #defines from ArchitecturalMsr.h</title>
<updated>2024-06-26T06:04:49+00:00</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2024-01-25T07:39:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=78bccfec9ce5082499db035270e7998d5330d75c'/>
<id>urn:sha1:78bccfec9ce5082499db035270e7998d5330d75c</id>
<content type='text'>
Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
</content>
</entry>
<entry>
<title>OvmfPkg/Sec: Setup MTRR early in the boot process.</title>
<updated>2024-06-26T06:04:49+00:00</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2024-01-23T14:33:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=ce4c76e46d52e24551f4986bded4c9b764502200'/>
<id>urn:sha1:ce4c76e46d52e24551f4986bded4c9b764502200</id>
<content type='text'>
Specifically before running lzma uncompress of the main firmware volume.
This is needed to make sure caching is enabled, otherwise the uncompress
can be extremely slow.

Adapt the ASSERTs and MTRR setup in PlatformInitLib to the changes.

Background:  Depending on virtual machine configuration kvm may uses EPT
memory types to apply guest MTRR settings.  In case MTRRs are disabled
kvm will use the uncachable memory type for all mappings.  The
vmx_get_mt_mask() function in the linux kernel handles this and can be
found here:

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/x86/kvm/vmx/vmx.c?h=v6.7.1#n7580

In most VM configurations kvm uses MTRR_TYPE_WRBACK unconditionally.  In
case the VM has a mdev device assigned that is not the case though.

Before commit e8aa4c6546ad ("UefiCpuPkg/ResetVector: Cache Disable
should not be set by default in CR0") kvm also ended up using
MTRR_TYPE_WRBACK due to KVM_X86_QUIRK_CD_NW_CLEARED.  After that commit
kvm evaluates guest mtrr settings, which why setting up MTRRs early is
important now.

Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
</content>
</entry>
<entry>
<title>OvmfPkg: Don't make APIC MMIO accesses with encryption bit set</title>
<updated>2024-05-02T12:43:50+00:00</updated>
<author>
<name>Michael Roth</name>
<email>michael.roth@amd.com</email>
</author>
<published>2024-05-02T11:49:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=f0ed194236b1fe55199ee82c014b70119ee3f227'/>
<id>urn:sha1:f0ed194236b1fe55199ee82c014b70119ee3f227</id>
<content type='text'>
For the most part, OVMF will clear the encryption bit for MMIO regions,
but there is currently one known exception during SEC when the APIC
base address is accessed via MMIO with the encryption bit set for
SEV-ES/SEV-SNP guests. In the case of SEV-SNP, this requires special
handling on the hypervisor side which may not be available in the
future[1], so make the necessary changes in the SEC-configured page
table to clear the encryption bit for 4K region containing the APIC
base address.

[1] https://lore.kernel.org/lkml/20240208002420.34mvemnzrwwsaesw@amd.com/#t

Suggested-by: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Cc: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Cc: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Cc: Erdem Aktas &lt;erdemaktas@google.com&gt;
Cc: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Cc: Min Xu &lt;min.m.xu@intel.com&gt;
Cc: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Cc: Jianyong Wu &lt;jianyong.wu@arm.com&gt;
Cc: Anatol Belski &lt;anbelski@linux.microsoft.com&gt;
Signed-off-by: Michael Roth &lt;michael.roth@amd.com&gt;
Reviewed-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
</content>
</entry>
<entry>
<title>OvmfPkg: auto-generate (and fix) SEC ProcessLibraryConstructorList() decl</title>
<updated>2024-03-08T09:09:22+00:00</updated>
<author>
<name>Laszlo Ersek</name>
<email>lersek@redhat.com</email>
</author>
<published>2024-03-05T11:38:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=1fbc121cfeaaed04ddd67baceb7a8770b027d2da'/>
<id>urn:sha1:1fbc121cfeaaed04ddd67baceb7a8770b027d2da</id>
<content type='text'>
&lt;Library/PeimEntryPoint.h&gt; declares a bogus
ProcessLibraryConstructorList() for OVMF's SEC module. Rely on AutoGen for
(properly) declaring ProcessLibraryConstructorList(). Update the call.

Build-tested with:

  build -a X64 -b DEBUG -m OvmfPkg/Sec/SecMain.inf \
    -p OvmfPkg/OvmfPkgX64.dsc -t GCC5

Cc: Ard Biesheuvel &lt;ardb+tianocore@kernel.org&gt;
Cc: Erdem Aktas &lt;erdemaktas@google.com&gt;
Cc: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Cc: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Cc: Michael Roth &lt;michael.roth@amd.com&gt;
Cc: Min Xu &lt;min.m.xu@intel.com&gt;
Cc: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=990
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4643
Signed-off-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Message-Id: &lt;20240305113843.68812-3-lersek@redhat.com&gt;
Reviewed-by: Jiewen Yao &lt;Jiewen.yao@intel.com&gt;
Acked-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
</content>
</entry>
<entry>
<title>OvmfPkg: Update code to be more C11 compliant by using __func__</title>
<updated>2023-04-10T14:19:57+00:00</updated>
<author>
<name>Rebecca Cran</name>
<email>rebecca@bsdio.com</email>
</author>
<published>2023-04-06T19:49:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=8ba392687b6f7fcb6e333756edd090003c57402e'/>
<id>urn:sha1:8ba392687b6f7fcb6e333756edd090003c57402e</id>
<content type='text'>
__FUNCTION__ is a pre-standard extension that gcc and Visual C++ among
others support, while __func__ was standardized in C99.

Since it's more standard, replace __FUNCTION__ with __func__ throughout
OvmfPkg.

Signed-off-by: Rebecca Cran &lt;rebecca@bsdio.com&gt;
Reviewed-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Reviewed-by: Sunil V L &lt;sunilvl@ventanamicro.com&gt;
</content>
</entry>
<entry>
<title>OvmfPkg: Remove UefiCpuLib from module INFs.</title>
<updated>2023-03-10T08:23:56+00:00</updated>
<author>
<name>Yu Pu</name>
<email>yu.pu@intel.com</email>
</author>
<published>2022-03-29T03:46:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=cd81e8e0306794476f736dbbd188b0d1d5286c63'/>
<id>urn:sha1:cd81e8e0306794476f736dbbd188b0d1d5286c63</id>
<content type='text'>
Because UefiCpuPkg/UefiCpuLib is merged to MdePkg/CpuLib, remove the
dependency of UefiCpuLib.

Cc: Ard Biesheuvel &lt;ardb+tianocore@kernel.org&gt;
Cc: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Cc: Jordan Justen &lt;jordan.l.justen@intel.com&gt;
Acked-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Signed-off-by: Yu Pu &lt;yu.pu@intel.com&gt;
Signed-off-by: Zhiguang Liu &lt;zhiguang.liu@intel.com&gt;
</content>
</entry>
<entry>
<title>OvmfPkg/OvmfPkgX64: Measure TdHob and Configuration FV in SecMain</title>
<updated>2023-02-04T03:38:15+00:00</updated>
<author>
<name>Min M Xu</name>
<email>min.m.xu@intel.com</email>
</author>
<published>2023-02-03T03:31:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=6ea50514c145642ea133937174e0ffe9348cd894'/>
<id>urn:sha1:6ea50514c145642ea133937174e0ffe9348cd894</id>
<content type='text'>
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4243

TdHob and Configuration FV (Cfv) are external inputs from VMM. From the
security perspective, they should be measured before they're consumed.
This patch measures TdHob and Cfv and stores the measurement values in
WorkArea.

Cc: Erdem Aktas &lt;erdemaktas@google.com&gt;
Cc: James Bottomley &lt;jejb@linux.ibm.com&gt;
Cc: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Cc: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Cc: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Cc: Michael Roth &lt;michael.roth@amd.com&gt;
Acked-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Reviewed-by: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Signed-off-by: Min Xu &lt;min.m.xu@intel.com&gt;
</content>
</entry>
<entry>
<title>OvmfPkg: Refactor ProcessHobList</title>
<updated>2023-02-04T03:38:15+00:00</updated>
<author>
<name>Min M Xu</name>
<email>min.m.xu@intel.com</email>
</author>
<published>2023-02-03T03:31:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=c0984d1ff28325a8f1c76e23a79141cbb12c3e4f'/>
<id>urn:sha1:c0984d1ff28325a8f1c76e23a79141cbb12c3e4f</id>
<content type='text'>
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4243

ProcessHobList once was implemented in PlatformInitLib and it walks thru
TdHob list and accept un-accepted memories.

This patch moves the codes to SecTdxHelperLib and rename ProcessHobList
as TdxHelperProcessTdHob

After TdxHelperProcessTdHob is introduced, below changes are applied:
 - Call TdxHelperProcessTdHob instead of ProcessHobList in SecMain.c
   (in both OvmfPkgX64/Sec and IntelTdx/Sec).
 - Delete the duplicated codes in PlatformInitLib

Cc: Erdem Aktas &lt;erdemaktas@google.com&gt;
Cc: James Bottomley &lt;jejb@linux.ibm.com&gt;
Cc: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Cc: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Cc: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Cc: Michael Roth &lt;michael.roth@amd.com&gt;
Acked-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Reviewed-by: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Signed-off-by: Min Xu &lt;min.m.xu@intel.com&gt;
</content>
</entry>
</feed>
