REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1547

Only doing IOTLB invalidation would cause a BSOD
'DRIVER_VERIFIER_DMA_VIOLATION' while changing the second
level page entry's attributes. So always do the global
invalidation of context-cache and IOTLB.

Cc: Jiewen Yao <jiewen....@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaga...@intel.com>
Cc: Liming Gao <liming....@intel.com>
Signed-off-by: Zhichao Gao <zhichao....@intel.com>
---
 IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c 
b/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c
index 22bf821d2b..d939d9d27e 100644
--- a/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c
+++ b/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c
@@ -139,16 +139,12 @@ InvalidateVtdIOTLBGlobal (
   //
   // Invalidate the context cache
   //
-  if (mVtdUnitInformation[VtdIndex].HasDirtyContext) {
-    InvalidateContextCache (VtdIndex);
-  }
+  InvalidateContextCache (VtdIndex);
 
   //
   // Invalidate the IOTLB cache
   //
-  if (mVtdUnitInformation[VtdIndex].HasDirtyContext || 
mVtdUnitInformation[VtdIndex].HasDirtyPages) {
-    InvalidateIOTLB (VtdIndex);
-  }
+  InvalidateIOTLB (VtdIndex);
 
   return EFI_SUCCESS;
 }
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#39756): https://edk2.groups.io/g/devel/message/39756
Mute This Topic: https://groups.io/mt/31381240/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to