[edk2-devel] [PATCH V2 06/28] MdePkg: Update BaseIoLibIntrinsicSev to support Tdx

Min Xu min.m.xu at intel.com
Fri Oct 22 05:23:50 UTC 2021


On October 14, 2021 1:38 PM, Gerd Hoffmann wrote:
> > > Calling CPUID should not be needed, we have a new fancy
> > > ConfidentialComputing PCD for that now.
> > The gUefiCpuPkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr is
> defined in UefiCpuPkg. While BaseIoLibIntrinsicSev is in MdePkg.
> > If the ConfidentialComputing PCD is used, then UefiCpuPkg has to be
> included in BaseIoLibIntrinsicSev.inf.
> > I check all the *.inf under MdePkg but no one *.inf include UefiCpuPkg.
> > I am not sure if UefiCpuPkg can be included in BaseIoLibIntrinsicSev.inf.
> 
> Hmm, I guess we should move the pcd then so it cam be used more widely.
> Confidential computing has an impact beyond just cpu, it's also memory, io
> and more.
> 
> > > Maybe that's something to cleanup for amd (Brijesh?) beforehand, so
> > > the structure is there already and the tdx patches just need to add the
> "case tdx:"
> > > bits.
> > Tdx patches can first use above structure. AMD can update it later. Either
> way is ok.
> 
> That'll work too, I don't care much about the ordering.
> 
Hi, Gerd
I revisit this comments and I think we cannot use the PCD in BaseIoLib to
determine Tdx or SEV or legacy guest. It is because BaseIoLib may be called
in SEC phase in which the PCD (it is set in PlatformPei) is not available then.
That's why CPUID(0x21) is used in used in BaseIoLib to probe tdx guest.

Thanks.
Min


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#82471): https://edk2.groups.io/g/devel/message/82471
Mute This Topic: https://groups.io/mt/86085732/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list