Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933203AbdCJJOz (ORCPT ); Fri, 10 Mar 2017 04:14:55 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:36248 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932502AbdCJJOx (ORCPT ); Fri, 10 Mar 2017 04:14:53 -0500 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, Joerg Roedel , David Woodhouse Cc: Greg Kroah-Hartman , stable@vger.kernel.org, iommu@lists.linux-foundation.org, Ashok Raj , Yunhong Jiang , Joerg Roedel Subject: [PATCH 4.4 27/91] iommu/vt-d: Tylersburg isoch identity map check is done too late. Date: Fri, 10 Mar 2017 10:08:26 +0100 Message-Id: <20170310083902.113369001@linuxfoundation.org> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170310083900.730556986@linuxfoundation.org> References: <20170310083900.730556986@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1310 Lines: 46 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ashok Raj commit 21e722c4c8377b5bc82ad058fed12165af739c1b upstream. 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: Ashok Raj Fixes: 86080ccc22 ("iommu/vt-d: Allocate si_domain in init_dmars()") Signed-off-by: Ashok Raj Reported-by: Yunhong Jiang Signed-off-by: Joerg Roedel Signed-off-by: Greg Kroah-Hartman --- drivers/iommu/intel-iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -3238,13 +3238,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