OvmfPkg: Check Tdx in QemuFwCfgPei to avoid DMA operation
RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3429 If TDX is enabled then we do not support DMA operation in PEI phase. This is mainly because DMA in TDX guest requires using bounce buffer (which need to allocate dynamic memory and allocating a PAGE size'd buffer can be challenge in PEI phase). Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Brijesh Singh <brijesh.singh@amd.com> Cc: Erdem Aktas <erdemaktas@google.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Min Xu <min.m.xu@intel.com>
This commit is contained in:
@@ -59,4 +59,15 @@ InternalQemuFwCfgDmaBytes (
|
||||
IN UINT32 Control
|
||||
);
|
||||
|
||||
/**
|
||||
Check if it is Tdx guest
|
||||
|
||||
@retval TRUE It is Tdx guest
|
||||
@retval FALSE It is not Tdx guest
|
||||
**/
|
||||
BOOLEAN
|
||||
QemuFwCfgIsTdxGuest (
|
||||
VOID
|
||||
);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user