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

2022-06-30 Thread Lu Baolu
On 6/30/22 4:28 PM, Tian, Kevin wrote: From: Lu Baolu Sent: Saturday, June 25, 2022 8:52 PM +struct iommu_domain_info { + struct intel_iommu *iommu; + unsigned int refcnt; + u16 did; +}; + struct dmar_domain { int nid;/* node id */ - -

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

2022-06-30 Thread Tian, Kevin
> From: Lu Baolu > Sent: Saturday, June 25, 2022 8:52 PM > > +struct iommu_domain_info { > + struct intel_iommu *iommu; > + unsigned int refcnt; > + u16 did; > +}; > + > struct dmar_domain { > int nid;/* node id */ > - > - unsigned int

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

2022-06-25 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