On Mon, 12 Mar 2018 15:18:30 +0100 Oliver Heid <oliver.h...@h-next.de> wrote:
> Many thanks! > > mmap succeeds - I removed the checks only to post the code on this list. > I use this now: > > if ( !ioctl(container, VFIO_IOMMU_MAP_DMA, &dma_map) ) > { if ( !ioctl(container, VFIO_IOMMU_MAP_DMA, &dma_map) ) > { perror("mmap ioctl"); return 1; } > } > Um, the ioctl returns zero on success, as most ioctls do. Your test only reaches the perror if it's able to successfully dma map the same area twice, so yeah, I would expect that never "fails". _______________________________________________ vfio-users mailing list vfio-users@redhat.com https://www.redhat.com/mailman/listinfo/vfio-users