Re: [PATCH v2 12/13] iommu/arm-smmu-v3: Introduce struct arm_smmu_vmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 11, 2024 at 08:15:35AM +0000, Tian, Kevin wrote:
> > From: Nicolin Chen <nicolinc@xxxxxxxxxx>
> > Sent: Wednesday, December 4, 2024 6:10 AM
> > 
> > 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 and
> > put
> > them in the existing arm_smmu_attach_prepare/commit(). Note that identity
> > and blocked ops don't call arm_smmu_attach_prepare/commit(), thus
> > simply
> > call the new helpers at the top.
> 
> Probably a dumb question. viommu is tied to a nested parent domain
> which cannot be identity or blocked. Why do we need to change them
> too?

For identity/blocked domains, prepare() would return 0 without
allocating a vmaster pointer, so later on commit() would update
master->vmaster with a NULL, i.e. it's a cleanup routine when
switching from a paging/dma domain to an identity/blocked one.

I will update the commit message to make this clear.

Thanks
Nic




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux