diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2011-05-24 07:02:41 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2011-05-24 08:08:34 -0400 |
commit | 7b668357810ecb5fdda4418689d50f5d95aea6a8 (patch) | |
tree | 5a448c81b76121cd3903f807288bd562dc27645b /drivers | |
parent | b3a530e4e734cab7043a3ab7d135f539042443a7 (diff) |
intel-iommu: Flush unmaps at domain_exit
We typically batch unmaps to be lazily flushed out at
regular intervals. When we destroy a domain, we need
to force a flush of these lazy unmaps to be sure none
reference the domain we're about to free.
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=35062
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Cc: stable@kernel.org
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/intel-iommu.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 4e4e0202e59d..395f253c0494 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c | |||
@@ -1422,6 +1422,10 @@ static void domain_exit(struct dmar_domain *domain) | |||
1422 | if (!domain) | 1422 | if (!domain) |
1423 | return; | 1423 | return; |
1424 | 1424 | ||
1425 | /* Flush any lazy unmaps that may reference this domain */ | ||
1426 | if (!intel_iommu_strict) | ||
1427 | flush_unmaps_timeout(0); | ||
1428 | |||
1425 | domain_remove_dev_info(domain); | 1429 | domain_remove_dev_info(domain); |
1426 | /* destroy iovas */ | 1430 | /* destroy iovas */ |
1427 | put_iova_domain(&domain->iovad); | 1431 | put_iova_domain(&domain->iovad); |