Re: [PATCH V2 13/28] UefiCpuPkg: Enable Tdx support in MpInitLib


Min Xu
 

On October 14, 2021 2:05 PM, Gerd Hoffmann wrote:
On Thu, Oct 14, 2021 at 12:27:13AM +0000, Xu, Min M wrote:
On October 12, 2021 6:32 PM, Gerd Hoffman wrote:
Hi,

+ do {
+ AsmCpuid (0, &LargestEax, &Ebx, &Ecx, &Edx);
Again: this should use PCD.
ConfidentialComputing PCD is set in PlatformPei. So any check of this PCD
should be after PlatformPei.

Can we move that to the SEC phase?
PCD cannot be set in SEC phase.

MpInitLib will be included in CpuMpPei. So if PCD is checked in MpInitLib,
then we must assume CpuMpPei is called after PlatformPei.
In current OVMF, CpuMpPei is called after PlatforPei. But I am not sure if it is
always the case. Can we have such assumption?
Based on above consideration, CPUID is used to probe if it is Tdx guest.
Not sure. There are no explicit depex dependencies, so I suspect the
initialization order could change.

take care,
Gerd

Join devel@edk2.groups.io to automatically receive all group messages.