Skip to content

Commit

Permalink
iommu/vt-d: Init QI before root entry is allocated
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joerg Roedel committed Jun 16, 2015
1 parent 9f10e5b commit b63d80d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/iommu/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand Down

0 comments on commit b63d80d

Please sign in to comment.