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 <ardb+tianoc...@kernel.org> > Cc: Jordan Justen <jordan.l.jus...@intel.com> > Cc: Brijesh Singh <brijesh.si...@amd.com> > Cc: Erdem Aktas <erdemak...@google.com> > Cc: James Bottomley <j...@linux.ibm.com> > Cc: Jiewen Yao <jiewen....@intel.com> > Cc: Tom Lendacky <thomas.lenda...@amd.com> > Cc: Gerd Hoffmann <kra...@redhat.com> > Signed-off-by: Min Xu <min.m...@intel.com> > --- > 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: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-