Lines Matching refs:cmd

50 	struct iommu_test_cmd cmd = {  in _test_cmd_mock_domain()  local
51 .size = sizeof(cmd), in _test_cmd_mock_domain()
58 ret = ioctl(fd, IOMMU_TEST_CMD, &cmd); in _test_cmd_mock_domain()
62 *stdev_id = cmd.mock_domain.out_stdev_id; in _test_cmd_mock_domain()
63 assert(cmd.id != 0); in _test_cmd_mock_domain()
65 *hwpt_id = cmd.mock_domain.out_hwpt_id; in _test_cmd_mock_domain()
67 *idev_id = cmd.mock_domain.out_idev_id; in _test_cmd_mock_domain()
80 struct iommu_test_cmd cmd = { in _test_cmd_mock_domain_replace() local
81 .size = sizeof(cmd), in _test_cmd_mock_domain_replace()
90 ret = ioctl(fd, IOMMU_TEST_CMD, &cmd); in _test_cmd_mock_domain_replace()
94 *hwpt_id = cmd.mock_domain_replace.pt_id; in _test_cmd_mock_domain_replace()
108 struct iommu_hwpt_alloc cmd = { in _test_cmd_hwpt_alloc() local
109 .size = sizeof(cmd), in _test_cmd_hwpt_alloc()
115 ret = ioctl(fd, IOMMU_HWPT_ALLOC, &cmd); in _test_cmd_hwpt_alloc()
119 *hwpt_id = cmd.out_hwpt_id; in _test_cmd_hwpt_alloc()
129 struct iommu_test_cmd cmd = { in _test_cmd_access_replace_ioas() local
130 .size = sizeof(cmd), in _test_cmd_access_replace_ioas()
137 ret = ioctl(fd, IOMMU_TEST_CMD, &cmd); in _test_cmd_access_replace_ioas()
148 struct iommu_test_cmd cmd = { in _test_cmd_create_access() local
149 .size = sizeof(cmd), in _test_cmd_create_access()
156 ret = ioctl(fd, IOMMU_TEST_CMD, &cmd); in _test_cmd_create_access()
159 *access_id = cmd.create_access.out_access_fd; in _test_cmd_create_access()
176 struct iommu_test_cmd cmd = { in _test_cmd_destroy_access_pages() local
177 .size = sizeof(cmd), in _test_cmd_destroy_access_pages()
182 return ioctl(fd, IOMMU_TEST_CMD, &cmd); in _test_cmd_destroy_access_pages()
193 struct iommu_destroy cmd = { in _test_ioctl_destroy() local
194 .size = sizeof(cmd), in _test_ioctl_destroy()
197 return ioctl(fd, IOMMU_DESTROY, &cmd); in _test_ioctl_destroy()
203 struct iommu_ioas_alloc cmd = { in _test_ioctl_ioas_alloc() local
204 .size = sizeof(cmd), in _test_ioctl_ioas_alloc()
208 ret = ioctl(fd, IOMMU_IOAS_ALLOC, &cmd); in _test_ioctl_ioas_alloc()
211 *id = cmd.out_ioas_id; in _test_ioctl_ioas_alloc()
223 struct iommu_ioas_map cmd = { in _test_ioctl_ioas_map() local
224 .size = sizeof(cmd), in _test_ioctl_ioas_map()
233 cmd.iova = *iova; in _test_ioctl_ioas_map()
235 ret = ioctl(fd, IOMMU_IOAS_MAP, &cmd); in _test_ioctl_ioas_map()
236 *iova = cmd.iova; in _test_ioctl_ioas_map()
284 struct iommu_ioas_unmap cmd = { in _test_ioctl_ioas_unmap() local
285 .size = sizeof(cmd), in _test_ioctl_ioas_unmap()
292 ret = ioctl(fd, IOMMU_IOAS_UNMAP, &cmd); in _test_ioctl_ioas_unmap()
294 *out_len = cmd.length; in _test_ioctl_ioas_unmap()
348 #define EXPECT_ERRNO(expected_errno, cmd) \ argument
350 ASSERT_EQ(-1, cmd); \
361 struct iommu_hw_info cmd = { in _test_cmd_get_hw_info() local
362 .size = sizeof(cmd), in _test_cmd_get_hw_info()
369 ret = ioctl(fd, IOMMU_GET_HW_INFO, &cmd); in _test_cmd_get_hw_info()
373 assert(cmd.out_data_type == IOMMU_HW_INFO_TYPE_SELFTEST); in _test_cmd_get_hw_info()
379 assert(cmd.data_len == sizeof(struct iommu_test_hw_info)); in _test_cmd_get_hw_info()
385 if (data_len > cmd.data_len) { in _test_cmd_get_hw_info()
386 char *ptr = (char *)(data + cmd.data_len); in _test_cmd_get_hw_info()
389 while (idx < data_len - cmd.data_len) { in _test_cmd_get_hw_info()