Lines Matching refs:map_cmd
2353 TEST_F(iommufd, map_cmd) in TEST_F() argument
2355 struct vfio_iommu_type1_dma_map map_cmd = { in TEST_F() local
2361 map_cmd.argsz = 1; in TEST_F()
2362 EXPECT_ERRNO(EINVAL, ioctl(self->fd, VFIO_IOMMU_MAP_DMA, &map_cmd)); in TEST_F()
2364 map_cmd.argsz = sizeof(map_cmd); in TEST_F()
2365 map_cmd.flags = 1 << 31; in TEST_F()
2366 EXPECT_ERRNO(EINVAL, ioctl(self->fd, VFIO_IOMMU_MAP_DMA, &map_cmd)); in TEST_F()
2369 map_cmd.flags = VFIO_DMA_MAP_FLAG_READ | VFIO_DMA_MAP_FLAG_WRITE; in TEST_F()
2370 EXPECT_ERRNO(ENODEV, ioctl(self->fd, VFIO_IOMMU_MAP_DMA, &map_cmd)); in TEST_F()
2622 struct vfio_iommu_type1_dma_map map_cmd = { in TEST_F() local
2623 .argsz = sizeof(map_cmd), in TEST_F()
2638 ASSERT_EQ(0, ioctl(self->fd, VFIO_IOMMU_MAP_DMA, &map_cmd)); in TEST_F()
2643 ASSERT_EQ(0, ioctl(self->fd, VFIO_IOMMU_MAP_DMA, &map_cmd)); in TEST_F()
2654 map_cmd.iova = pages_iova[i] = in TEST_F()
2656 map_cmd.vaddr = (uintptr_t)buffer + i * PAGE_SIZE; in TEST_F()
2657 map_cmd.size = PAGE_SIZE; in TEST_F()
2658 ASSERT_EQ(0, ioctl(self->fd, VFIO_IOMMU_MAP_DMA, &map_cmd)); in TEST_F()
2673 struct vfio_iommu_type1_dma_map map_cmd = { in TEST_F() local
2674 .argsz = sizeof(map_cmd), in TEST_F()
2691 map_cmd.vaddr = (uintptr_t)buf; in TEST_F()
2692 ASSERT_EQ(0, ioctl(self->fd, VFIO_IOMMU_MAP_DMA, &map_cmd)); in TEST_F()