diff options
author | Joerg Roedel <jroedel@suse.de> | 2015-06-12 12:32:54 +0200 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2015-06-16 10:59:35 +0200 |
commit | a87f491890e994dca4bee64690d7e5183a19264e (patch) | |
tree | 8f0f769c86ceb8d94cef03418525c41ef001d1f6 /drivers/iommu/intel-iommu.c | |
parent | iommu/vt-d: Allocate si_domain in init_dmars() (diff) | |
download | linux-a87f491890e994dca4bee64690d7e5183a19264e.tar.xz linux-a87f491890e994dca4bee64690d7e5183a19264e.zip |
iommu/vt-d: Don't do early domain assignment if kdump kernel
When we copied over context tables from an old kernel, we
need to defer assignment of devices to domains until the
device driver takes over. So skip this part of
initialization when we copied over translation tables from
the old kernel.
Tested-by: ZhenHua Li <zhen-hual@hp.com>
Tested-by: Baoquan He <bhe@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/intel-iommu.c')
-rw-r--r-- | drivers/iommu/intel-iommu.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index b43f04933015..3b32aa55f27c 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -3001,6 +3001,7 @@ static int __init init_dmars(void) { struct dmar_drhd_unit *drhd; struct dmar_rmrr_unit *rmrr; + bool copied_tables = false; struct device *dev; struct intel_iommu *iommu; int i, ret; @@ -3091,6 +3092,7 @@ static int __init init_dmars(void) } else { pr_info("Copied translation tables from previous kernel for %s\n", iommu->name); + copied_tables = true; } } @@ -3119,6 +3121,15 @@ static int __init init_dmars(void) check_tylersburg_isoch(); /* + * If we copied translations from a previous kernel in the kdump + * case, we can not assign the devices to domains now, as that + * would eliminate the old mappings. So skip this part and defer + * the assignment to device driver initialization time. + */ + if (copied_tables) + goto domains_done; + + /* * If pass through is not set or not enabled, setup context entries for * identity mappings for rmrr, gfx, and isa and may fall back to static * identity mapping if iommu_identity_mapping is set. @@ -3157,6 +3168,8 @@ static int __init init_dmars(void) iommu_prepare_isa(); +domains_done: + /* * for each drhd * enable fault log |