Messages in this thread | | | Date | Tue, 27 Feb 2024 07:40:32 -0800 | From | Christoph Hellwig <> | Subject | Re: [PATCH v4 5/5] iommu/dma: Force swiotlb_max_mapping_size on an untrusted device |
| |
On Wed, Feb 21, 2024 at 11:35:04AM +0000, Will Deacon wrote: > +static size_t iommu_dma_max_mapping_size(struct device *dev) > +{ > + if (is_swiotlb_active(dev) && dev_is_untrusted(dev)) > + return swiotlb_max_mapping_size(dev);
Curious: do we really need both checks here? If swiotlb is active for a device (for whatever reason), aren't we then always bound by the max size? If not please add a comment explaining it.
| |