Hi, > > 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. > MemEncryptTdxIsEnabled() is checking the ConfidentialComputing PCD. MemEncryptSevIsEnabled () has 3 implementations in SEC/PEI/DXE. In SEC/PEI phase the ConfidentialComputing PCD has not been ready and it just checks the Msr.Bits.SevBit.
Another consideration is that as the first step we make the least change so that it will not break the existing feature. After that we revisit here and refine the code if possible. Thanks Min -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#84669): https://edk2.groups.io/g/devel/message/84669 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] -=-=-=-=-=-=-=-=-=-=-=-