Re: [PATCH V2 06/28] MdePkg: Update BaseIoLibIntrinsicSev to support Tdx


Gerd Hoffmann
 

On Tue, Oct 05, 2021 at 11:39:17AM +0800, Min Xu wrote:
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, SRIOV devices and Direct Device assignments.
This monster patch needs splitting up. At least into io + mmio + fifo.
Adding the tdx helper functions can be a separate patch too.

Calling CPUID should not be needed, we have a new fancy
ConfidentialComputing PCD for that now.

The new wrappers in IoLibFifo.c should also check for sev, so we have
something along the lines of ...

switch (getpcd(cc)) {
case tdx:
TdxFifo(...)
break;
case sev:
SevFifo(...)
break;
default:
DefaultFifo(...)
break;
}

... instead of hiding the default case in IoFifoSev.nasm.

Maybe that's something to cleanup for amd (Brijesh?) beforehand, so the
structure is there already and the tdx patches just need to add the
"case tdx:" bits.

take care,
Gerd

Join devel@edk2.groups.io to automatically receive all group messages.