public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gao, Zhichao" <zhichao.gao@intel.com>
To: devel@edk2.groups.io
Cc: Jiewen Yao <jiewen.yao@intel.com>, Ray Ni <ray.ni@intel.com>,
	Rangasai V Chaganty <rangasai.v.chaganty@intel.com>,
	Liming Gao <liming.gao@intel.com>
Subject: [PATCH] IntelSiliconPkg/IntelVTdDxe: Always do global invalidation
Date: Mon, 29 Apr 2019 16:52:47 +0800	[thread overview]
Message-ID: <20190429085247.23720-1-zhichao.gao@intel.com> (raw)

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


                 reply	other threads:[~2019-04-29  8:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190429085247.23720-1-zhichao.gao@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox