On Mon, Nov 01, 2021 at 09:16:17PM +0800, Min Xu wrote: > RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3429 > > In the previous QemuFwCfgDxe only SEV is supported. This commit > introduce TDX support in QemuFwCfgDxe. > > Cc: Ard Biesheuvel <[email protected]> > Cc: Jordan Justen <[email protected]> > Cc: Brijesh Singh <[email protected]> > Cc: Erdem Aktas <[email protected]> > Cc: James Bottomley <[email protected]> > Cc: Jiewen Yao <[email protected]> > Cc: Tom Lendacky <[email protected]> > Cc: Gerd Hoffmann <[email protected]> > Signed-off-by: Min Xu <[email protected]> > --- > OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxe.c | 9 +++++---- > OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxeLib.inf | 1 + > 2 files changed, 6 insertions(+), 4 deletions(-) > > diff --git a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxe.c > b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxe.c > index 0182c9235cac..7a60b3e82863 100644 > --- a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxe.c > +++ b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxe.c > @@ -19,6 +19,7 @@ > #include <Library/DebugLib.h> > #include <Library/QemuFwCfgLib.h> > #include <Library/UefiBootServicesTableLib.h> > +#include <Library/MemEncryptTdxLib.h> > #include <Library/MemEncryptSevLib.h> > > #include "QemuFwCfgLibInternal.h" > @@ -85,7 +86,7 @@ QemuFwCfgInitialize ( > DEBUG ((DEBUG_INFO, "QemuFwCfg interface (DMA) is supported.\n")); > } > > - if (mQemuFwCfgDmaSupported && MemEncryptSevIsEnabled ()) { > + if (mQemuFwCfgDmaSupported && (MemEncryptSevIsEnabled () || > (MemEncryptTdxIsEnabled ()))) { > EFI_STATUS Status;
Should be possible to just check the ConfidentialComputing PCD here. take care, Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#83228): https://edk2.groups.io/g/devel/message/83228 Mute This Topic: https://groups.io/mt/86739896/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
