@@ -307,9 +307,9 @@ union ucmd_buffer {
307307 struct iommu_ioas_map map ;
308308 struct iommu_ioas_unmap unmap ;
309309 struct iommu_option option ;
310+ struct iommu_vdevice_alloc vdev ;
310311 struct iommu_vfio_ioas vfio_ioas ;
311312 struct iommu_viommu_alloc viommu ;
312- struct iommu_vdevice_alloc vdev ;
313313#ifdef CONFIG_IOMMUFD_TEST
314314 struct iommu_test_cmd test ;
315315#endif
@@ -333,8 +333,8 @@ struct iommufd_ioctl_op {
333333 }
334334static const struct iommufd_ioctl_op iommufd_ioctl_ops [] = {
335335 IOCTL_OP (IOMMU_DESTROY , iommufd_destroy , struct iommu_destroy , id ),
336- IOCTL_OP (IOMMU_FAULT_QUEUE_ALLOC , iommufd_fault_alloc , struct iommu_fault_alloc ,
337- out_fault_fd ),
336+ IOCTL_OP (IOMMU_FAULT_QUEUE_ALLOC , iommufd_fault_alloc ,
337+ struct iommu_fault_alloc , out_fault_fd ),
338338 IOCTL_OP (IOMMU_GET_HW_INFO , iommufd_get_hw_info , struct iommu_hw_info ,
339339 __reserved ),
340340 IOCTL_OP (IOMMU_HWPT_ALLOC , iommufd_hwpt_alloc , struct iommu_hwpt_alloc ,
@@ -355,20 +355,18 @@ static const struct iommufd_ioctl_op iommufd_ioctl_ops[] = {
355355 src_iova ),
356356 IOCTL_OP (IOMMU_IOAS_IOVA_RANGES , iommufd_ioas_iova_ranges ,
357357 struct iommu_ioas_iova_ranges , out_iova_alignment ),
358- IOCTL_OP (IOMMU_IOAS_MAP , iommufd_ioas_map , struct iommu_ioas_map ,
359- iova ),
358+ IOCTL_OP (IOMMU_IOAS_MAP , iommufd_ioas_map , struct iommu_ioas_map , iova ),
360359 IOCTL_OP (IOMMU_IOAS_MAP_FILE , iommufd_ioas_map_file ,
361360 struct iommu_ioas_map_file , iova ),
362361 IOCTL_OP (IOMMU_IOAS_UNMAP , iommufd_ioas_unmap , struct iommu_ioas_unmap ,
363362 length ),
364- IOCTL_OP (IOMMU_OPTION , iommufd_option , struct iommu_option ,
365- val64 ),
363+ IOCTL_OP (IOMMU_OPTION , iommufd_option , struct iommu_option , val64 ),
364+ IOCTL_OP (IOMMU_VDEVICE_ALLOC , iommufd_vdevice_alloc_ioctl ,
365+ struct iommu_vdevice_alloc , virt_id ),
366366 IOCTL_OP (IOMMU_VFIO_IOAS , iommufd_vfio_ioas , struct iommu_vfio_ioas ,
367367 __reserved ),
368368 IOCTL_OP (IOMMU_VIOMMU_ALLOC , iommufd_viommu_alloc_ioctl ,
369369 struct iommu_viommu_alloc , out_viommu_id ),
370- IOCTL_OP (IOMMU_VDEVICE_ALLOC , iommufd_vdevice_alloc_ioctl ,
371- struct iommu_vdevice_alloc , virt_id ),
372370#ifdef CONFIG_IOMMUFD_TEST
373371 IOCTL_OP (IOMMU_TEST_CMD , iommufd_test , struct iommu_test_cmd , last ),
374372#endif
@@ -490,8 +488,8 @@ static const struct iommufd_object_ops iommufd_object_ops[] = {
490488 [IOMMUFD_OBJ_DEVICE ] = {
491489 .destroy = iommufd_device_destroy ,
492490 },
493- [IOMMUFD_OBJ_IOAS ] = {
494- .destroy = iommufd_ioas_destroy ,
491+ [IOMMUFD_OBJ_FAULT ] = {
492+ .destroy = iommufd_fault_destroy ,
495493 },
496494 [IOMMUFD_OBJ_HWPT_PAGING ] = {
497495 .destroy = iommufd_hwpt_paging_destroy ,
@@ -501,15 +499,15 @@ static const struct iommufd_object_ops iommufd_object_ops[] = {
501499 .destroy = iommufd_hwpt_nested_destroy ,
502500 .abort = iommufd_hwpt_nested_abort ,
503501 },
504- [IOMMUFD_OBJ_FAULT ] = {
505- .destroy = iommufd_fault_destroy ,
506- },
507- [IOMMUFD_OBJ_VIOMMU ] = {
508- .destroy = iommufd_viommu_destroy ,
502+ [IOMMUFD_OBJ_IOAS ] = {
503+ .destroy = iommufd_ioas_destroy ,
509504 },
510505 [IOMMUFD_OBJ_VDEVICE ] = {
511506 .destroy = iommufd_vdevice_destroy ,
512507 },
508+ [IOMMUFD_OBJ_VIOMMU ] = {
509+ .destroy = iommufd_viommu_destroy ,
510+ },
513511#ifdef CONFIG_IOMMUFD_TEST
514512 [IOMMUFD_OBJ_SELFTEST ] = {
515513 .destroy = iommufd_selftest_destroy ,
0 commit comments