]> git.proxmox.com Git - mirror_edk2.git/commit
OvmfPkg: Call CcProbe in SecMain.c instead of TsIsEnabled
authorMin Xu <min.m.xu@intel.com>
Tue, 19 Apr 2022 00:26:28 +0000 (08:26 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 19 Apr 2022 01:26:08 +0000 (01:26 +0000)
commit76fda1def3d1baea3b01ae697687ff478d2d1b42
treeae75969f40f630dc5362f9f92a332afbfff6833d
parent7012cb73c473521e4fe4c997bfbfdfca0bd4b90c
OvmfPkg: Call CcProbe in SecMain.c instead of TsIsEnabled

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

TdIsEnabled() uses the CPUID instruction. At this point, exception
handling is not established and a CPUID instruction will generate
a #VC and cause the booting guest to crash.

CcProbe() checks Ovmf work area to return the guest type. So call
of CcProbe() instead of TdIsEnabled() to fix the above issue.

Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
OvmfPkg/IntelTdx/Sec/SecMain.c
OvmfPkg/IntelTdx/Sec/SecMain.inf
OvmfPkg/Sec/SecMain.c
OvmfPkg/Sec/SecMain.inf