lkml.org 
[lkml]   [2022]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 3/8] iommu/vt-d: Implement device_pasid domain attach ops
On Wed, Mar 16, 2022 at 01:50:04PM -0700, Jacob Pan wrote:

> I guess a list of (device, pasid) tuples as you suggested could work but it
> will have duplicated device entries since each device could have multiple
> PASIDs. right?

Is assigning the same iommu_domain to multiple PASIDs of the same
device something worth optimizing for?

I would expect real applications will try to use the same PASID for
the same IOVA map to optimize IOTLB caching.

Is there a use case for that I'm missing?

Otherwise your explanation is what I was imagining as well.

I would also think about expanding your struct so that the device
driver can track per-device per-domain data as well, that seems
useful IIRC?

ie put a 'sizeof_iommu_dev_pasid_data' in the domain->ops and
allocate that much memory so the driver can use the trailer space for
its own purpose.

Jason

\
 
 \ /
  Last update: 2022-03-16 23:16    [W:0.296 / U:0.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site