mirror of https://github.com/acidanthera/audk.git
Currently, TDX exposes MTRR CPUID bit to TDX VM. So based on the CPUID, the guest software components (OVMF/TDVF and guest kernel) will access MTRR MSRs. One problem for guest to use of MTRR is the change of MTRR setting needs to set CR0.CD=1, which will case #VE for TDX. For Linux kernel, there is a mechanism called SW defined MTRR introduced by the patch https://lore.kernel.org/all/20230502120931. 20719-4-jgross@suse.com/. If this is integrated for TDX guest, then Linux kernel will not access any MTRR MSRs. So we update MtrrLibIsMtrrSupported() to always return false for TD-Guest, then TDVF will not access MTRR MSRs at all. Cc: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Binbin Wu <binbin.wu@intel.com> Signed-off-by: Min Xu <min.m.xu@intel.com> |
||
---|---|---|
.. | ||
AmdSvsmLibNull | ||
BaseRiscV64CpuExceptionHandlerLib | ||
BaseRiscV64CpuTimerLib | ||
BaseRiscVMmuLib | ||
BaseXApicLib | ||
BaseXApicX2ApicLib | ||
CcExitLibNull | ||
CpuCacheInfoLib | ||
CpuCommonFeaturesLib | ||
CpuExceptionHandlerLib | ||
CpuMmuLib | ||
CpuPageTableLib | ||
CpuTimerLib | ||
MicrocodeLib | ||
MmSaveStateLib | ||
MmUnblockMemoryLib | ||
MpInitLib | ||
MpInitLibUp | ||
MtrrLib | ||
PlatformSecLibNull | ||
RegisterCpuFeaturesLib | ||
SecPeiDxeTimerLibUefiCpu | ||
SmmCpuFeaturesLib | ||
SmmCpuPlatformHookLibNull | ||
SmmCpuRendezvousLib | ||
SmmCpuSyncLib | ||
SmmRelocationLib |