Re: [PATCH 3/4] iommu/vt-d: Allow IOMMU_DOMAIN_DMA and IOMMU_DOMAIN_IDENTITY to be allocated

2019-03-07 Thread Dmitry Safonov via iommu
On 3/4/19 3:46 PM, James Sewart wrote: > +static inline int domain_is_initialised(struct dmar_domain *domain) > +{ > + return domain->flags & DOMAIN_FLAG_INITIALISED; > +} Maybe check it in intel_iommu_domain_free(), eh? Thanks, Dmitry

Re: [PATCH 3/4] iommu/vt-d: Allow IOMMU_DOMAIN_DMA and IOMMU_DOMAIN_IDENTITY to be allocated

2019-03-05 Thread James Sewart via iommu
Hey Lu, > On 5 Mar 2019, at 06:46, Lu Baolu wrote: > > Hi, > > On 3/4/19 11:46 PM, James Sewart wrote: >> Allowing IOMMU_DOMAIN_DMA type IOMMU domain to be allocated allows the >> default_domain of an iommu_group to be set. This delegates device-domain >> relationships to the generic IOMMU

Re: [PATCH 3/4] iommu/vt-d: Allow IOMMU_DOMAIN_DMA and IOMMU_DOMAIN_IDENTITY to be allocated

2019-03-04 Thread Lu Baolu
Hi, On 3/4/19 11:46 PM, James Sewart wrote: Allowing IOMMU_DOMAIN_DMA type IOMMU domain to be allocated allows the default_domain of an iommu_group to be set. This delegates device-domain relationships to the generic IOMMU code. Signed-off-by: James Sewart --- drivers/iommu/intel-iommu.c |

[PATCH 3/4] iommu/vt-d: Allow IOMMU_DOMAIN_DMA and IOMMU_DOMAIN_IDENTITY to be allocated

2019-03-04 Thread James Sewart via iommu
Allowing IOMMU_DOMAIN_DMA type IOMMU domain to be allocated allows the default_domain of an iommu_group to be set. This delegates device-domain relationships to the generic IOMMU code. Signed-off-by: James Sewart --- drivers/iommu/intel-iommu.c | 113 +++- 1 file