Re: [PATCH v2 3/6] iommu/vt-d: Refactor iommu information of each domain

2022-07-06 Thread Baolu Lu
On 2022/7/7 09:01, Tian, Kevin wrote: From: Lu Baolu Sent: Saturday, July 2, 2022 9:56 AM -out_unlock: + set_bit(num, iommu->domain_ids); + info->refcnt = 1; + info->did= num; + info->iommu = iommu; + domain->nid = iommu->node; One nit. this line should be

RE: [PATCH v2 3/6] iommu/vt-d: Refactor iommu information of each domain

2022-07-06 Thread Tian, Kevin
> From: Lu Baolu > Sent: Saturday, July 2, 2022 9:56 AM > > -out_unlock: > + set_bit(num, iommu->domain_ids); > + info->refcnt= 1; > + info->did = num; > + info->iommu = iommu; > + domain->nid = iommu->node; One nit. this line should be removed as it's

[PATCH v2 3/6] iommu/vt-d: Refactor iommu information of each domain

2022-07-01 Thread Lu Baolu
When a DMA domain is attached to a device, it needs to allocate a domain ID from its IOMMU. Currently, the domain ID information is stored in two static arrays embedded in the domain structure. This can lead to memory waste when the driver is running on a small platform. This optimizes these