Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: 3a3b12cbdae2e89b0e365eb01c378891d0d9037c
      
https://github.com/tianocore/edk2/commit/3a3b12cbdae2e89b0e365eb01c378891d0d9037c
  Author: Min M Xu <min.m...@intel.com>
  Date:   2024-09-20 (Fri, 20 Sep 2024)

  Changed paths:
    M UefiCpuPkg/Library/MtrrLib/MtrrLib.c

  Log Message:
  -----------
  UefiCpuPkg/MtrrLib: MtrrLibIsMtrrSupported always return FALSE in TD-Guest

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-jgr...@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...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Jiaxin Wu <jiaxin...@intel.com>
Cc: Jiewen Yao <jiewen....@intel.com>
Cc: Binbin Wu <binbin...@intel.com>
Signed-off-by: Min Xu <min.m...@intel.com>



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

Reply via email to