[Design] iommu/arm-smmu-v3: Implementing set_dev_pasid for other domain types
Michael Shavit
mshavit at google.com
Fri Mar 24 22:42:22 PDT 2023
On Fri, Mar 24, 2023 at 8:31 PM Jean-Philippe Brucker
<jean-philippe at linaro.org> wrote:
> > As a first order consequence, when multiple devices share a domain:
> > 1. We’ll use more memory than we would have before.
>
> I wonder if we could save some memory by reducing the allocation size for
> single-entry context tables: it looks like dma_direct_alloc() gives us a
> full page at the moment even though we only need 64 bytes per CD
> (and S1ContextPtr alignment is 64B).
Oh interesting, I can give that a try. I'm guessing you mean by
allocating from a pool when a master with ssid=1 needs to allocate its
cd table?
> > 2. The SMMU will perform dma to distinct CD tables to find the
> > page table; however the page table itself would still be shared.
>
> Yes, I'd expect this to be negligible since an SMMU would cache the CD
>
> >
> > Is that acceptable considering some users might not need the
> > set_dev_pasid support this is geared towards?
>
> That does sound like a nice cleanup. When I last looked at this years ago,
> there were two cases that shared a CD table between devices:
Awesome, thanks for the feedback Jean. I'll start drafting-up a patch
series over the next few weeks then.
More information about the linux-arm-kernel
mailing list