diff options
-rw-r--r-- | drivers/iommu/intel-iommu.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 90ab0115d78e..fc2765ccdb57 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c | |||
@@ -2055,11 +2055,14 @@ static int domain_context_mapping_one(struct dmar_domain *domain, | |||
2055 | if (context_copied(context)) { | 2055 | if (context_copied(context)) { |
2056 | u16 did_old = context_domain_id(context); | 2056 | u16 did_old = context_domain_id(context); |
2057 | 2057 | ||
2058 | if (did_old >= 0 && did_old < cap_ndoms(iommu->cap)) | 2058 | if (did_old >= 0 && did_old < cap_ndoms(iommu->cap)) { |
2059 | iommu->flush.flush_context(iommu, did_old, | 2059 | iommu->flush.flush_context(iommu, did_old, |
2060 | (((u16)bus) << 8) | devfn, | 2060 | (((u16)bus) << 8) | devfn, |
2061 | DMA_CCMD_MASK_NOBIT, | 2061 | DMA_CCMD_MASK_NOBIT, |
2062 | DMA_CCMD_DEVICE_INVL); | 2062 | DMA_CCMD_DEVICE_INVL); |
2063 | iommu->flush.flush_iotlb(iommu, did_old, 0, 0, | ||
2064 | DMA_TLB_DSI_FLUSH); | ||
2065 | } | ||
2063 | } | 2066 | } |
2064 | 2067 | ||
2065 | pgd = domain->pgd; | 2068 | pgd = domain->pgd; |