diff options
Diffstat (limited to 'sys/linux')
| -rw-r--r-- | sys/linux/dev_vfio.txt | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/sys/linux/dev_vfio.txt b/sys/linux/dev_vfio.txt index ef78ec10b..b4e2525cd 100644 --- a/sys/linux/dev_vfio.txt +++ b/sys/linux/dev_vfio.txt @@ -19,15 +19,18 @@ ioctl$VFIO_GET_API_VERSION(fd fd_vfio, cmd const[VFIO_GET_API_VERSION]) ioctl$VFIO_CHECK_EXTENSION(fd fd_vfio, cmd const[VFIO_CHECK_EXTENSION], arg flags[iommu_flags]) ioctl$VFIO_SET_IOMMU(fd fd_vfio, cmd const[VFIO_SET_IOMMU], arg flags[iommu_flags]) -ioctl$VFIO_IOMMU_GET_INFO(fd fd_vfio, cmd const[VFIO_IOMMU_GET_INFO], arg ptr[inout, vfio_iommu_type1_info]) +ioctl$VFIO_IOMMU_GET_INFO(fd fd_vfio, cmd const[VFIO_IOMMU_GET_INFO], arg ptr[in, vfio_iommu_type1_info]) ioctl$VFIO_IOMMU_MAP_DMA(fd fd_vfio, cmd const[VFIO_IOMMU_MAP_DMA], arg ptr[in, vfio_iommu_type1_dma_map]) ioctl$VFIO_IOMMU_UNMAP_DMA(fd fd_vfio, cmd const[VFIO_IOMMU_UNMAP_DMA], arg ptr[in, vfio_iommu_type1_dma_unmap]) vfio_iommu_type1_info { argsz len[parent, int32] flags const[0, int32] - iova_pgsizes const[0, int64] - cap_offset int32 + iova_pgsizes int64 (out) + cap_offset int32 (out) +# iommufd constructs the cap chain like this, vfio will work as well but the things will be jumbled a bit + cap1 vfio_iommu_type1_info_dma_avail (out) + cap2 vfio_iommu_type1_info_cap_iova_range (out) } vfio_iommu_type1_dma_map { @@ -46,5 +49,28 @@ vfio_iommu_type1_dma_unmap { data array[int8] } +vfio_info_cap_header { + id int16 + version int16 + next int16 +} + +vfio_iova_range { + start int64 + end int64 +} + +vfio_iommu_type1_info_cap_iova_range { + header vfio_info_cap_header + nr_iovs int32 + reserved int32 + iova_ranges array[vfio_iova_range] +} + +vfio_iommu_type1_info_dma_avail { + header vfio_info_cap_header + avail int32 +} + iommu_flags = VFIO_TYPE1_IOMMU, VFIO_SPAPR_TCE_IOMMU, VFIO_TYPE1v2_IOMMU, VFIO_DMA_CC_IOMMU, VFIO_EEH, VFIO_TYPE1_NESTING_IOMMU, VFIO_SPAPR_TCE_v2_IOMMU, VFIO_NOIOMMU_IOMMU vfio_dma_flags = VFIO_DMA_MAP_FLAG_READ, VFIO_DMA_MAP_FLAG_WRITE |
