| From 761e9f7a6419bb21d33cd2acc2506a5c8918fad1 Mon Sep 17 00:00:00 2001 |
| From: Ashok Raj <ashok.raj@intel.com> |
| Date: Mon, 30 Jan 2017 09:39:53 -0800 |
| Subject: [PATCH] iommu/vt-d: Tylersburg isoch identity map check is done too |
| late. |
| |
| 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 <joro@8bytes.org> |
| To: David Woodhouse <dwmw2@infradead.org> |
| Cc: iommu@lists.linux-foundation.org |
| Cc: linux-kernel@vger.kernel.org |
| Cc: stable@vger.kernel.org |
| Cc: Ashok Raj <ashok.raj@intel.com> |
| |
| Fixes: 86080ccc22 ("iommu/vt-d: Allocate si_domain in init_dmars()") |
| Signed-off-by: Ashok Raj <ashok.raj@intel.com> |
| Reported-by: Yunhong Jiang <yunhong.jiang@intel.com> |
| Signed-off-by: Joerg Roedel <jroedel@suse.de> |
| Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> |
| |
| diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c |
| index dbc03e2d8235..f88b2bbc3b56 100644 |
| --- a/drivers/iommu/intel-iommu.c |
| +++ b/drivers/iommu/intel-iommu.c |
| @@ -3291,13 +3291,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.12.0 |
| |