I am interested in adding a new memory mapping option that establishes
one identity-mapped region for all DMA_TO_DEVICE mappings and creates
a new dynamic mapping for any DMA_FROM_DEVICE and DMA_BIDIRECTIONAL
mappings. My thought is it should allow for a compromise between
security and performance (in the case of networking) in that many of
the server NICs drivers these days are running with mostly pinned or
resused paged for Rx. By using an identity mapping for the Tx packets
we should be able to significantly cut down on the IOMMU overhead for
the device. The other advantage if this works is that we could use
this to possibly do something like dirty page tracking in the case of
a emulated version of the IOMMU.

I was originally thinking I could get away with just reusing the
identity mapping code but it looks like that would end up merging
everything into one domain if I am understanding correctly. Do I have
that right?

Would I be correct in assuming that I will need to have a separate
domain per device, each domain containing the 1 TO_DEVICE identity
mapped region, and then whatever other mappings are needed to handle
the FROM and BIDIRECTIONAL mappings?

Thanks.

- Alex
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to