On December 14, 2022 12:05 AM, Lendacky, Thomas wrote: > On 12/12/22 23:48, Min Xu wrote: > > From: Tom Lendacky <thomas.lenda...@amd.com> > > > > Add support to use the reserved shared memory within the IoMmu library. > > This improves boot times for all SEV guests, with SEV-SNP benefiting > > the most as it avoids the page state change call to the hypervisor. > > Thanks for including the patch, Min. > > One difference between my original and yours noted below, feel free to > ignore, though. > > Otherwise, tested and validated. > > > > > - if (CC_GUEST_IS_SEV (PcdGet64 (PcdConfidentialComputingGuestAttr))) > { > > - // > > - // Clear the memory encryption mask on the plaintext buffer. > > - // > > - Status = MemEncryptSevClearPageEncMask ( > > - 0, > > - MapInfo->PlainTextAddress, > > - MapInfo->NumberOfPages > > - ); > > - } else if (CC_GUEST_IS_TDX (PcdGet64 > > (PcdConfidentialComputingGuestAttr))) { > > + if (MapInfo->ReservedMemBitmap == 0) { > > // > > // Set the memory shared bit. > > My original patch deleted this line since it is different for each type of CC > guest and commented about in each if block. > Thanks for reminder. I will delete this line in the next version.
Thanks Min -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#97332): https://edk2.groups.io/g/devel/message/97332 Mute This Topic: https://groups.io/mt/95639827/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-