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 = {
> > +
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
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