@@ -307,9 +307,9 @@ union ucmd_buffer {
307
307
struct iommu_ioas_map map ;
308
308
struct iommu_ioas_unmap unmap ;
309
309
struct iommu_option option ;
310
+ struct iommu_vdevice_alloc vdev ;
310
311
struct iommu_vfio_ioas vfio_ioas ;
311
312
struct iommu_viommu_alloc viommu ;
312
- struct iommu_vdevice_alloc vdev ;
313
313
#ifdef CONFIG_IOMMUFD_TEST
314
314
struct iommu_test_cmd test ;
315
315
#endif
@@ -333,8 +333,8 @@ struct iommufd_ioctl_op {
333
333
}
334
334
static const struct iommufd_ioctl_op iommufd_ioctl_ops [] = {
335
335
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 ),
338
338
IOCTL_OP (IOMMU_GET_HW_INFO , iommufd_get_hw_info , struct iommu_hw_info ,
339
339
__reserved ),
340
340
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[] = {
355
355
src_iova ),
356
356
IOCTL_OP (IOMMU_IOAS_IOVA_RANGES , iommufd_ioas_iova_ranges ,
357
357
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 ),
360
359
IOCTL_OP (IOMMU_IOAS_MAP_FILE , iommufd_ioas_map_file ,
361
360
struct iommu_ioas_map_file , iova ),
362
361
IOCTL_OP (IOMMU_IOAS_UNMAP , iommufd_ioas_unmap , struct iommu_ioas_unmap ,
363
362
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 ),
366
366
IOCTL_OP (IOMMU_VFIO_IOAS , iommufd_vfio_ioas , struct iommu_vfio_ioas ,
367
367
__reserved ),
368
368
IOCTL_OP (IOMMU_VIOMMU_ALLOC , iommufd_viommu_alloc_ioctl ,
369
369
struct iommu_viommu_alloc , out_viommu_id ),
370
- IOCTL_OP (IOMMU_VDEVICE_ALLOC , iommufd_vdevice_alloc_ioctl ,
371
- struct iommu_vdevice_alloc , virt_id ),
372
370
#ifdef CONFIG_IOMMUFD_TEST
373
371
IOCTL_OP (IOMMU_TEST_CMD , iommufd_test , struct iommu_test_cmd , last ),
374
372
#endif
@@ -490,8 +488,8 @@ static const struct iommufd_object_ops iommufd_object_ops[] = {
490
488
[IOMMUFD_OBJ_DEVICE ] = {
491
489
.destroy = iommufd_device_destroy ,
492
490
},
493
- [IOMMUFD_OBJ_IOAS ] = {
494
- .destroy = iommufd_ioas_destroy ,
491
+ [IOMMUFD_OBJ_FAULT ] = {
492
+ .destroy = iommufd_fault_destroy ,
495
493
},
496
494
[IOMMUFD_OBJ_HWPT_PAGING ] = {
497
495
.destroy = iommufd_hwpt_paging_destroy ,
@@ -501,15 +499,15 @@ static const struct iommufd_object_ops iommufd_object_ops[] = {
501
499
.destroy = iommufd_hwpt_nested_destroy ,
502
500
.abort = iommufd_hwpt_nested_abort ,
503
501
},
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 ,
509
504
},
510
505
[IOMMUFD_OBJ_VDEVICE ] = {
511
506
.destroy = iommufd_vdevice_destroy ,
512
507
},
508
+ [IOMMUFD_OBJ_VIOMMU ] = {
509
+ .destroy = iommufd_viommu_destroy ,
510
+ },
513
511
#ifdef CONFIG_IOMMUFD_TEST
514
512
[IOMMUFD_OBJ_SELFTEST ] = {
515
513
.destroy = iommufd_selftest_destroy ,
0 commit comments