From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: zhichao.gao@intel.com) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by groups.io with SMTP; Mon, 29 Apr 2019 01:54:34 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Apr 2019 01:54:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,409,1549958400"; d="scan'208";a="227664057" Received: from fieedk001.ccr.corp.intel.com ([10.239.33.119]) by orsmga001.jf.intel.com with ESMTP; 29 Apr 2019 01:54:32 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Jiewen Yao , Ray Ni , Rangasai V Chaganty , Liming Gao Subject: [PATCH] IntelSiliconPkg/IntelVTdDxe: Always do global invalidation Date: Mon, 29 Apr 2019 16:52:47 +0800 Message-Id: <20190429085247.23720-1-zhichao.gao@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Cc: Ray Ni Cc: Rangasai V Chaganty Cc: Liming Gao Signed-off-by: Zhichao Gao --- 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