mbox series

[v5,0/2] support IOMMU for DMA device

Message ID 20210927074806.90020-1-xuan.ding@intel.com (mailing list archive)
Series support IOMMU for DMA device |


Ding, Xuan Sept. 27, 2021, 7:48 a.m. UTC
  This series supports DMA device to use vfio in async vhost.

The first patch extends the capability of current vfio dma mapping
API to allow partial unmapping for adjacent memory if the platform
does not support partial unmapping. The second patch involves the
IOMMU programming for guest memory in async vhost.

* Fix issue of a pointer be freed early.

* Fix a format issue.

* Move the async_map_status flag to virtio_net structure to avoid
ABI breaking.

* Add rte_errno filtering for some devices bound in the kernel driver.
* Add a flag to check the status of region mapping.
* Fix one typo.

Xuan Ding (2):
  vfio: allow partially unmapping adjacent memory
  vhost: enable IOMMU for async vhost

 lib/eal/linux/eal_vfio.c | 338 ++++++++++++++++++++++++++-------------
 lib/vhost/vhost.h        |   4 +
 lib/vhost/vhost_user.c   | 114 ++++++++++++-
 3 files changed, 344 insertions(+), 112 deletions(-)