On Monday, August 30, 2021 3:41 PM, Gerd Hoffmann wrote: > Hi, > > > _TdxPageTable: > > If 5-level page table is supported (GPAW is 52), a top level page > > directory pointers (1 * 256TB entry) is generated in this page. > > _OvmfPageTable: > > Initial page table for standard Ovmf. > > Hmm, isn't 5-level paging independent from TDX? Why mix the two? > > I think a top level page directory should be added to the standard ovmf > initial > page tables instead, and setting up 5-level paging should not happen in tdx- > specific code. In current Ovmf implementation (OvmfPkg/ResetVector/Ia32/PageTables64.asm) there are 6 pages reserved for initial page tables. It doesn't support 5-level paging.
TDX support GPAW 48 and 52. If GPAW is 52 we need an extra page to hold the top level page directory pointers (1 * 256TB entry). This TDX extra page reuses the memory region defined by PcdOvmfSecGhcbPageTableBase In MEMFD. Because this memory region (PcdOvmfSecGhcbPageTableBase) will not be consumed by SEV code in Tdx guest. > Thanks! Min -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#79973): https://edk2.groups.io/g/devel/message/79973 Mute This Topic: https://groups.io/mt/85242569/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-