Re: [PATCH v2 7/7] iommu/vt-d: Remove lazy allocation of domains

2019-03-22 Thread James Sewart via iommu
Hey Jacob, > On 14 Mar 2019, at 23:35, Jacob Pan wrote: > > On Thu, 14 Mar 2019 11:59:36 + > James Sewart wrote: > >> >> -domain = get_valid_domain_for_dev(dev); >> +domain = find_domain(dev); >> if (!domain) >> return DMA_MAPPING_ERROR; >> >> @@ -3914,7

Re: [PATCH v2 7/7] iommu/vt-d: Remove lazy allocation of domains

2019-03-14 Thread Jacob Pan
On Thu, 14 Mar 2019 11:59:36 + James Sewart wrote: > > - domain = get_valid_domain_for_dev(dev); > + domain = find_domain(dev); > if (!domain) > return DMA_MAPPING_ERROR; > > @@ -3914,7 +3624,7 @@ static int intel_map_sg(struct device *dev, > struct

[PATCH v2 7/7] iommu/vt-d: Remove lazy allocation of domains

2019-03-14 Thread James Sewart via iommu
The generic IOMMU code will allocate and attach a default domain to each device that comes online. This patch removes the lazy domain allocation and early reserved region mapping that is now redundant. Signed-off-by: James Sewart --- drivers/iommu/intel-iommu.c | 300