On Wed, Aug 09, 2023 at 08:18:18AM +0800, Baolu Lu wrote:
On 2023/8/8 15:49, Tina Zhang wrote:No! The iommu_domain and the PASID are totally seperate objects with
A sva domain's lifetime begins with binding a device to a mm and endsIs it more appropriate to have the same life cycle for sva domain and mm
by releasing all the bound devices from that sva domain. Technically,
there could be more than one sva domain identified by the mm PASID for
the use of bound devices issuing DMA transactions.
To support mm PASID 1:n with sva domains, each mm needs to keep both a
reference list of allocated sva domains and the corresponding PASID.
However, currently, mm struct only has one pasid field for sva usage,
which is used to keep the info of an assigned PASID. That pasid field
cannot provide sufficient info to build up the 1:n mapping between PASID
and sva domains.
pasid? I feel that they represent the same thing, that is, the address
space shared by mm to a device.
their own lifecycles.
The SVA domain should NEVER be tied to the mm enqcmd PASID.
We might decide to free all the domains and keep the PASID around (can
we even revoke the enqcmd pasid while the MM is alive?)