[edk2-devel] [PATCH 07/23] MdePkg: Update BaseIoLibIntrinsicSev to support Tdx

2021-08-12 Thread Min Xu
RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3429 Intel TDX architecture does not prescribe a specific software convention to perform I/O from the guest TD. Guest TD providers have many choices to provide I/O to the guest. The common I/O models are emulated devices, para-virtualized devices

Re: [edk2-devel] [PATCH 07/23] MdePkg: Update BaseIoLibIntrinsicSev to support Tdx

2021-08-17 Thread Gerd Hoffmann
Hi, > In the I/O functions of above files, if IsTdxGuest() returns TRUE, then > Td I/O routine is called, otherwise the legacy I/O routine is called. > Td I/O routines are declared in IoLibTdx.h and implemented in > IoLibInternalTdx.c. Sorry, I'm a bit late to the party, but what is the overall

Re: [edk2-devel] [PATCH 07/23] MdePkg: Update BaseIoLibIntrinsicSev to support Tdx

2021-08-17 Thread Min Xu
On August 17, 2021 4:38 PM, Gerd Hoffmann wrote: > > Hi, > > > In the I/O functions of above files, if IsTdxGuest() returns TRUE, > > then Td I/O routine is called, otherwise the legacy I/O routine is called. > > Td I/O routines are declared in IoLibTdx.h and implemented in > > IoLibInternalTdx

Re: [edk2-devel] [PATCH 07/23] MdePkg: Update BaseIoLibIntrinsicSev to support Tdx

2021-08-18 Thread Gerd Hoffmann
Hi, > > IIRC some of the TDX features require a separate firmware binary. So, if we > > need a separate binary anyway at some point in the future, isn't it simpler > > then > > to use a separate firmware binary right from the start? > > > > You can simply add a Tdx-specific variant of the lib

Re: [edk2-devel] [PATCH 07/23] MdePkg: Update BaseIoLibIntrinsicSev to support Tdx

2021-08-19 Thread Min Xu
On August 19, 2021 2:31 PM, Gerd Hoffmann wrote: > > > IIRC some of the TDX features require a separate firmware binary. > > > So, if we need a separate binary anyway at some point in the future, > > > isn't it simpler then to use a separate firmware binary right from the > > > start? > > > > > >

Re: [edk2-devel] [PATCH 07/23] MdePkg: Update BaseIoLibIntrinsicSev to support Tdx

2021-08-19 Thread Gerd Hoffmann
Hi, > > One more question: How does this align with the WorkArea changes posted > > yesterday? The WorkArea gets a mode field for SEV / TDX / normal, so I > > think > > you should be able to use that instead of invoking cpuid each time you need > > to know whenever tdx is active or not. > We

Re: [edk2-devel] [PATCH 07/23] MdePkg: Update BaseIoLibIntrinsicSev to support Tdx

2021-09-10 Thread Erdem Aktas via groups.io
On Thu, Aug 12, 2021 at 2:57 PM Min Xu wrote: > +UINT8 > +EFIAPI > +TdMmioRead8 ( > + IN UINTN Address > + ) > +{ > + UINT64 Value; > + UINT64 Status; > + > + Address |= TdSharedPageMask (); Why is the SharedBi

Re: [edk2-devel] [PATCH 07/23] MdePkg: Update BaseIoLibIntrinsicSev to support Tdx

2021-09-28 Thread Min Xu
On September 11, 2021 9:16 AM, Erdem Aktas wrote: > > On Thu, Aug 12, 2021 at 2:57 PM Min Xu wrote: > > +UINT8 > > +EFIAPI > > +TdMmioRead8 ( > > + IN UINTN Address > > + ) > > +{ > > + UINT64 Value; > > + UINT64