Re: [edk2-devel] [PATCH V2 05/28] MdePkg: Add TdxLib to wrap Tdx operations

2021-10-21 Thread Min Xu
On October 14, 2021 1:30 PM, Gerd Hoffmann wrote: > > > > +UINT8 *mExtendBufferAddress = NULL; > > > > +TDX_EXTEND_BUFFER mExtendBuffer; > > > > + > > > > +/** > > > > + TD.RTMR.EXTEND requires 64B-aligned guest physical address of > > > > + 48B-extension data. In runtime we walk

Re: [edk2-devel] [PATCH V2 05/28] MdePkg: Add TdxLib to wrap Tdx operations

2021-10-13 Thread Gerd Hoffmann
Hi, > > > +UINT8 *mExtendBufferAddress = NULL; > > > +TDX_EXTEND_BUFFER mExtendBuffer; > > > + > > > +/** > > > + TD.RTMR.EXTEND requires 64B-aligned guest physical address of > > > + 48B-extension data. In runtime we walk thru the Buffer to find > > > + out a 64B-aligned star

Re: [edk2-devel] [PATCH V2 05/28] MdePkg: Add TdxLib to wrap Tdx operations

2021-10-13 Thread Min Xu
On October 12, 2021 4:22 PM, Gerd Hoffmann wrote: > > +// PageSize is mapped to PageLevel like below: > > +// 4KB - 0, 2MB - 1 > > +UINT64 mTdxAcceptPageLevelMap[2] = { > > + SIZE_4KB, > > + SIZE_2MB > > No 1G pages? TDX: https://software.intel.com/content/dam/develop/external/us/en/documents/

Re: [edk2-devel] [PATCH V2 05/28] MdePkg: Add TdxLib to wrap Tdx operations

2021-10-12 Thread Gerd Hoffmann
> +// PageSize is mapped to PageLevel like below: > +// 4KB - 0, 2MB - 1 > +UINT64 mTdxAcceptPageLevelMap[2] = { > + SIZE_4KB, > + SIZE_2MB No 1G pages? > +UINTN > +GetGpaPageLevel ( > + UINT64 PageSize Uh, UINT32 is not enough? Keep the door open for 512G pages? > +{ > + UINTN Index; > +