From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com ([134.134.136.31]:27687 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753841AbdAZVxE (ORCPT ); Thu, 26 Jan 2017 16:53:04 -0500 From: Ashok Raj Cc: Ashok Raj , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH 2/2] iommu/vt-d: tylersburg isoch identity map check is done too late. Date: Thu, 26 Jan 2017 13:50:34 -0800 Message-Id: <1485467434-119978-2-git-send-email-ashok.raj@intel.com> In-Reply-To: <1485467434-119978-1-git-send-email-ashok.raj@intel.com> References: <1485467434-119978-1-git-send-email-ashok.raj@intel.com> To: unlisted-recipients:; (no To-header on input) Sender: stable-owner@vger.kernel.org List-ID: The check to set identity map for tylersburg is done too late. It needs to be done before the check for identity_map domain is done. To: Joerg Roedel To: David Woodhouse Cc: iommu@lists.linux-foundation.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org Cc: Ashok Raj Signed-off-by: Ashok Raj Reported-by: Yunhong Jiang --- drivers/iommu/intel-iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 8a18525..23eead3 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -3325,13 +3325,14 @@ static int __init init_dmars(void) iommu_identity_mapping |= IDENTMAP_GFX; #endif + check_tylersburg_isoch(); + if (iommu_identity_mapping) { ret = si_domain_init(hw_pass_through); if (ret) goto free_iommu; } - check_tylersburg_isoch(); /* * If we copied translations from a previous kernel in the kdump -- 2.7.4