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/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-