Skip to content

Commit

Permalink
intel-iommu: Only avoid flushing device IOTLB for domain ID 0 in cach…
Browse files Browse the repository at this point in the history
…ing mode

In caching mode, domain ID 0 is reserved for non-present to present
mapping flush. Device IOTLB doesn't need to be flushed in this case.

Previously we were avoiding the flush for domain zero, even if the IOMMU 
wasn't in caching mode and domain zero wasn't special.

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
Yu Zhao authored and David Woodhouse committed Jun 29, 2009
1 parent a679128 commit bf92df3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/pci/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,12 @@ static void iommu_flush_iotlb_psi(struct intel_iommu *iommu, u16 did,
else
iommu->flush.flush_iotlb(iommu, did, addr, mask,
DMA_TLB_PSI_FLUSH);
if (did)

/*
* In caching mode, domain ID 0 is reserved for non-present to present
* mapping flush. Device IOTLB doesn't need to be flushed in this case.
*/
if (!cap_caching_mode(iommu->cap) || did)
iommu_flush_dev_iotlb(iommu->domains[did], addr, mask);
}

Expand Down

0 comments on commit bf92df3

Please sign in to comment.