audk/OvmfPkg/Bhyve
Gerd Hoffmann ce4c76e46d 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 e8aa4c6546 ("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 <kraxel@redhat.com>
2024-06-26 06:04:49 +00:00
..
AcpiPlatformDxe OvmfPkg/Bhyve: don't exit early if RSDP is not found in memory 2023-09-08 16:06:10 +00:00
AcpiTables OvmfPkg: Bhyve: Delete unused AcpiTables/Ssdt.asl file 2021-12-23 07:48:08 +00:00
BhyveRfbDxe OvmfPkg: exclude the CSM-based VideoDxe driver 2023-12-07 18:04:57 +00:00
PlatformPei OvmfPkg/Sec: Setup MTRR early in the boot process. 2024-06-26 06:04:49 +00:00
ResetVector OvmfPkg/Bhyve: Copy Real16ToFlat32.asm and enable cache in CR0 2020-11-27 16:48:47 +00:00
SmbiosPlatformDxe OvmfPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
BhyveDefines.fdf.inc OvmfPkg/Bhyve: rename files to remove 'Pkg' infix 2020-08-24 17:57:07 +00:00
BhyveX64.dsc OvmfPkg/BhyvePkg: honor FwCfg when setting the bootorder 2024-06-18 19:18:07 +00:00
BhyveX64.fdf OvmfPkg: remove Rule.Common.USER_DEFINED.CSM from all FDF files 2023-12-07 18:04:57 +00:00
FvmainCompactScratchEnd.fdf.inc
License.txt
VarStore.fdf.inc