]> git.proxmox.com Git - mirror_edk2.git/commit
OvmfPkg/OvmfPkgX64: Use different CcProbeLib when SMM is on or off
authorMin Xu <min.m.xu@intel.com>
Wed, 18 May 2022 03:37:16 +0000 (11:37 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 20 May 2022 01:18:26 +0000 (01:18 +0000)
commita72d552f197b9b5cc3afdf22891b27ecf4067037
tree3aa34d828f692993d009184b4c6949de42d49e3f
parent1f026ababf350746c6071c0873d9d1c8824029ca
OvmfPkg/OvmfPkgX64: Use different CcProbeLib when SMM is on or off

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3930

CcProbeLib is designed to check the vm guest type. The OvmfPkg/CcProbeLib
reads the OvmfWorkArea (0x80B000) to get the vm guest type which is
written by each guest (SEV or TDX guest). But in SMM drivers the access
to OvmfWorkArea is illegal. PiSmmCpuDxeSmm.inf is an example. It uses
IoLib which in OvmfPkgX64 BaseIoLibIntrinsicSev.inf is included. The
IoLib probes if the working guest is td guest by calling CcProbe().

So CcProbeLibNull will be included when SMM_REQUIRE is set. Currently
only TDVF uses CcProbe to check the guest type, and TDVF doesn't
support SMM, so this fix has no side-effect.

Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Dann Frazier <dann.frazier@canonical.com>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Tested-by: dann frazier <dann.frazier@canonical.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
OvmfPkg/OvmfPkgX64.dsc