vfio: interfaces to update vaddr
authorSteve Sistare <steven.sistare@oracle.com>
Fri, 29 Jan 2021 16:54:07 +0000 (08:54 -0800)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 1 Feb 2021 20:20:06 +0000 (13:20 -0700)
commit441e8106a238920f28e2e79cff462044551f60e2
tree86a5b1e9d54c48874d25937c92087d4e08259474
parentc196509953741a8a472127c80070a0795a072f87
vfio: interfaces to update vaddr

Define interfaces that allow the underlying memory object of an iova
range to be mapped to a new host virtual address in the host process:

  - VFIO_DMA_UNMAP_FLAG_VADDR for VFIO_IOMMU_UNMAP_DMA
  - VFIO_DMA_MAP_FLAG_VADDR flag for VFIO_IOMMU_MAP_DMA
  - VFIO_UPDATE_VADDR extension for VFIO_CHECK_EXTENSION

Unmap vaddr invalidates the host virtual address in an iova range, and
blocks vfio translation of host virtual addresses.  DMA to already-mapped
pages continues.  Map vaddr updates the base VA and resumes translation.
See comments in uapi/linux/vfio.h for more details.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
include/uapi/linux/vfio.h