aboutsummaryrefslogtreecommitdiff
path: root/drivers/iommu
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2015-06-12 09:14:34 +0200
committerJoerg Roedel <jroedel@suse.de>2015-06-16 10:59:33 +0200
commitb63d80d1e01e949dbe469e1d72fc0b7e173dbdd8 (patch)
treea43402fbd67c1f08153477fbd2051ea8bb4c19b2 /drivers/iommu
parent9f10e5bf62f7b9937afeee8ff0a491f87438e2a2 (diff)
iommu/vt-d: Init QI before root entry is allocated
QI needs to be available when we write the root entry into hardware because flushes might be necessary after this. 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')
-rw-r--r--drivers/iommu/intel-iommu.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 4faec337c0cf..989761c8f017 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -2803,6 +2803,8 @@ static int __init init_dmars(void)
for_each_active_iommu(iommu, drhd) {
g_iommus[iommu->seq_id] = iommu;
+ intel_iommu_init_qi(iommu);
+
ret = iommu_init_domains(iommu);
if (ret)
goto free_iommu;
@@ -2819,9 +2821,6 @@ static int __init init_dmars(void)
hw_pass_through = 0;
}
- for_each_active_iommu(iommu, drhd)
- intel_iommu_init_qi(iommu);
-
if (iommu_pass_through)
iommu_identity_mapping |= IDENTMAP_ALL;