vfio: introduce vfio_dma_rw to read/write a range of IOVAs
authorYan Zhao <yan.y.zhao@intel.com>
Tue, 24 Mar 2020 15:27:57 +0000 (09:27 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 24 Mar 2020 15:27:57 +0000 (09:27 -0600)
commit8d46c0cca5f4dc0538173d62cd36b1119b5105bc
treedbeb3f92e8a28045d331ec68f4e7dafe8075b08c
parentc0560f51cf77472f4ed113539b0a02ca6cda7961
vfio: introduce vfio_dma_rw to read/write a range of IOVAs

vfio_dma_rw will read/write a range of user space memory pointed to by
IOVA into/from a kernel buffer without enforcing pinning the user space
memory.

TODO: mark the IOVAs to user space memory dirty if they are written in
vfio_dma_rw().

Cc: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Yan Zhao <yan.y.zhao@intel.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/vfio.c
drivers/vfio/vfio_iommu_type1.c
include/linux/vfio.h