public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] IntelSiliconPkg/IntelVTdDxe: Always do global invalidation
@ 2019-04-29  8:52 Gao, Zhichao
  0 siblings, 0 replies; only message in thread
From: Gao, Zhichao @ 2019-04-29  8:52 UTC (permalink / raw)
  To: devel; +Cc: Jiewen Yao, Ray Ni, Rangasai V Chaganty, Liming Gao

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.yao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-04-29  8:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-29  8:52 [PATCH] IntelSiliconPkg/IntelVTdDxe: Always do global invalidation Gao, Zhichao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox