Branch: refs/heads/master Home: https://github.com/tianocore/edk2 Commit: ce4c76e46d52e24551f4986bded4c9b764502200 https://github.com/tianocore/edk2/commit/ce4c76e46d52e24551f4986bded4c9b764502200 Author: Gerd Hoffmann <kra...@redhat.com> Date: 2024-06-26 (Wed, 26 Jun 2024)
Changed paths: M OvmfPkg/Bhyve/PlatformPei/MemDetect.c M OvmfPkg/IntelTdx/Sec/SecMain.c M OvmfPkg/Library/PlatformInitLib/MemDetect.c M OvmfPkg/Sec/SecMain.c Log Message: ----------- OvmfPkg/Sec: Setup MTRR early in the boot process. 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 <kra...@redhat.com> Commit: 5bef25dca4119ae9bd537480d703575ad166723a https://github.com/tianocore/edk2/commit/5bef25dca4119ae9bd537480d703575ad166723a Author: Gerd Hoffmann <kra...@redhat.com> Date: 2024-06-26 (Wed, 26 Jun 2024) Changed paths: M MdePkg/Include/Register/Intel/ArchitecturalMsr.h Log Message: ----------- MdePkg/ArchitecturalMsr.h: add #defines for MTRR cache types Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: 71e6cc8dad2de85512de2fdd6439ae2ebada295d https://github.com/tianocore/edk2/commit/71e6cc8dad2de85512de2fdd6439ae2ebada295d Author: Gerd Hoffmann <kra...@redhat.com> Date: 2024-06-26 (Wed, 26 Jun 2024) Changed paths: M UefiCpuPkg/Include/Library/MtrrLib.h Log Message: ----------- UefiCpuPkg/MtrrLib.h: use cache type #defines from ArchitecturalMsr.h Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Commit: 78bccfec9ce5082499db035270e7998d5330d75c https://github.com/tianocore/edk2/commit/78bccfec9ce5082499db035270e7998d5330d75c Author: Gerd Hoffmann <kra...@redhat.com> Date: 2024-06-26 (Wed, 26 Jun 2024) Changed paths: M OvmfPkg/IntelTdx/Sec/SecMain.c M OvmfPkg/Sec/SecMain.c Log Message: ----------- OvmfPkg/Sec: use cache type #defines from ArchitecturalMsr.h Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Compare: https://github.com/tianocore/edk2/compare/e21bfae345f9...78bccfec9ce5 To unsubscribe from these emails, change your notification settings at https://github.com/tianocore/edk2/settings/notifications _______________________________________________ edk2-commits mailing list edk2-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-commits