From: David Woodhouse Date: Sat, 19 Sep 2009 22:28:12 +0000 (-0700) Subject: intel-iommu: Disable PMRs after we enable translation, not before X-Git-Tag: Ubuntu-snapdragon-4.4.0-1050.54~24533^2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=b94996c99c8befed9cbbb8804a4625e203913318;p=mirror_ubuntu-artful-kernel.git intel-iommu: Disable PMRs after we enable translation, not before Signed-off-by: David Woodhouse --- diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 52026d1797ec..601c3278cf2a 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c @@ -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; @@ -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;