[edk2-devel] [PATCH V2 3/4] OvmfPkg/IoMmuDxe: Add SEV support for reserved shared memory

Min Xu min.m.xu at intel.com
Tue Dec 13 23:55:50 UTC 2022


On December 14, 2022 12:05 AM, Lendacky, Thomas wrote:
> On 12/12/22 23:48, Min Xu wrote:
> > From: Tom Lendacky <thomas.lendacky at 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/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