Skip to content

Commit

Permalink
intel-iommu: Disable PMRs after we enable translation, not before
Browse files Browse the repository at this point in the history
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Sep 19, 2009
1 parent 0c02a20 commit b94996c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/pci/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2403,11 +2403,12 @@ int __init init_dmars(void)

iommu->flush.flush_context(iommu, 0, 0, 0, DMA_CCMD_GLOBAL_INVL);
iommu->flush.flush_iotlb(iommu, 0, 0, 0, DMA_TLB_GLOBAL_FLUSH);
iommu_disable_protect_mem_regions(iommu);

ret = iommu_enable_translation(iommu);
if (ret)
goto error;

iommu_disable_protect_mem_regions(iommu);
}

return 0;
Expand Down Expand Up @@ -3066,8 +3067,8 @@ static int init_iommu_hw(void)
DMA_CCMD_GLOBAL_INVL);
iommu->flush.flush_iotlb(iommu, 0, 0, 0,
DMA_TLB_GLOBAL_FLUSH);
iommu_disable_protect_mem_regions(iommu);
iommu_enable_translation(iommu);
iommu_disable_protect_mem_regions(iommu);
}

return 0;
Expand Down

0 comments on commit b94996c

Please sign in to comment.