[edk2-devel] [PATCH V3 15/29] OvmfPkg: Update SecEntry.nasm to support Tdx

Min Xu min.m.xu at intel.com
Wed Dec 8 05:13:37 UTC 2021


On December 7, 2021 4:05 PM, Gerd Hoffmann wrote:
> > [Jiewen] OK, I talked with Min again. 12ms is not right data today.
> > We have bigger number, but I cannot share the data according to legal
> reason.
> >
> > But I agree with your statement that, if the data is small enough, then we
> don't need MP in sec.
> >
> > I propose this way:
> > 1) In first patch, we drop MP in SEC.
> 
> Yes.  Next implement lazy accept ...
> 
> > 2) We can revisit if it is really needed later, when the TDX platform is about
> to launch.
> 
> ... then revisit where we stand in terms of boot performance.
> 
> And, yes, doing that on the final tdx platform hardware instead of preliminary
> development hardware makes sense too.
> 
> > > Where does the 50% increase for GPAW=52 comes from?
> >
> > [Jiewen] Yes, this is about page table.
> > The reason is that UEFI spec requires you to map all memory. You have to
> create page table for all.
> 
> Seems that has changed with the latest (2.9) revision of the specs which
> explicitly excludes unaccepted memory.  From section 2.3.4:
> 
>     Paging mode is enabled and any memory space defined by the UEFI
>     memory map is identity mapped (virtual address equals physical
>     address), although the attributes of certain regions may not have
>     all read, write, and execute attributes or be unmarked for purposes
>     of platform protection. The mappings to other regions, such as those
>     for unaccepted memory, are undefined and may vary from
>     implementation to implementation.
> 
> So implementing lazy accept should bring the initial memory footprint down
> because page tables for unaccepted memory are not needed in SEC/PEI.  We
> can lazily allocate them in DXE instead when accepting memory (either all
> memory, or just enough to load the linux kernel and have linux accept the
> remaining memory).

So as the first step I will submit the patch-set without MP in SEC. Lazy accept will be a separate patch-set after that.
In the Lazy accept there are changes in multiply places, such as accept initial memory, publish pei memory, transfer to DXE hob list, DXE Core GCD services, Shell(memmap). Also we have to consider accept more memory in Pool/Page functions when OOM occurs.

Thanks
Min


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