Re: [PATCH v6 12/14] iommu/arm-smmu-v3: Introduce struct arm_smmu_vmaster

2025-02-19 Thread Nicolin Chen
On Tue, Feb 18, 2025 at 01:08:24PM -0400, Jason Gunthorpe wrote: > On Fri, Jan 24, 2025 at 04:30:41PM -0800, Nicolin Chen wrote: > > + int ret; > > struct arm_smmu_ste ste; > > struct arm_smmu_master *master = dev_iommu_priv_get(dev); > > + struct arm_smmu_attach_state state = { > > +

Re: [PATCH v6 12/14] iommu/arm-smmu-v3: Introduce struct arm_smmu_vmaster

2025-02-18 Thread Jason Gunthorpe
On Fri, Jan 24, 2025 at 04:30:41PM -0800, Nicolin Chen wrote: > + int ret; > struct arm_smmu_ste ste; > struct arm_smmu_master *master = dev_iommu_priv_get(dev); > + struct arm_smmu_attach_state state = { > + .master = master, > + }; > + > + ret = arm_smmu_at

[PATCH v6 12/14] iommu/arm-smmu-v3: Introduce struct arm_smmu_vmaster

2025-01-24 Thread Nicolin Chen
Use it to store all vSMMU-related data. The vsid (Virtual Stream ID) will be the first use case. Then, add a rw_semaphore to protect it. Also add a pair of arm_smmu_attach_prepare/commit_vmaster helpers to set or unset the master->vmaster point. Put these helpers inside the existing arm_smmu_attac