[edk2-devel] [PATCH V12 14/47] UefiCpuPkg: Enable Tdx support in MpInitLib

Min Xu min.m.xu at intel.com
Fri Apr 29 02:12:34 UTC 2022


On April 28, 2022 9:16 PM, Tom Lendacky wrote:
> > +  if (CC_GUEST_IS_TDX (PcdGet64 (PcdConfidentialComputingGuestAttr)))
> {
> > +    *ProcessorNumber = 0;
> > +    return EFI_SUCCESS;
> > +  }
> > +
> 
> I've narrowed down this change as causing issues when booting multiple
> vCPU guests (regular and SEV). This issues consist of EfiAcquireLock() /
> EfiReleaseLock() ASSERTS and TPL level ASSERTS that occur during
> ExitBootServices when the APs are being parked by RelocateApLoop(). The
> PCD accesses use locking which is not SMP safe. I believe PCD calls are not
> supposed to be issued by APs because of this (or at least not APs executing in
> parallel).
> 
> This check is spread throughout the MpLib code and I didn't look to see how
> many of those calls can be done by an AP. I think the PCD usage can be
> reduced to getting the PcdConfidentialComputingGuestAttr value at init and
> caching it in a STATIC variable, but I would feel better if @Min Xu could
> verify that and submit a patch accordingly. Otherwise, maybe this TDX guest
> setting could be added to the CpuMpData (similar to the SevEsIsEnabled, etc.
> fields).
>
I verified this fix and it seems working.  I will submit a patch soon.


Thanks
Min


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#89380): https://edk2.groups.io/g/devel/message/89380
Mute This Topic: https://groups.io/mt/90121206/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