aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/dev_iommu.txt
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@nvidia.com>2024-02-07 12:42:21 -0400
committerAleksandr Nogikh <nogikh@google.com>2024-03-13 10:41:39 +0000
commitb277d5602dfb9000e283837632b388ea22da1f62 (patch)
treeb8cf3446a410533acfeb9e0b1904cbdd60647992 /sys/linux/dev_iommu.txt
parent3374743756461ab01a88a056ff039393a7b73a49 (diff)
sys/linux: correct iommufd definitions
Some small mistakes have crept into here and the definitions are not working quite right The kernel changed the layout of the mock_domain test command to have three handles and moved the device_handl to the end. A new handle - the "selftest_device" was returned instead. check_map/check_refs takes in a hwpt_handle not an fd_access domain_replace takes in the selftest_device_handle and an ioas/pt access_replace_ioas uses the ioas_handle not a naked int32.
Diffstat (limited to 'sys/linux/dev_iommu.txt')
-rw-r--r--sys/linux/dev_iommu.txt15
1 files changed, 9 insertions, 6 deletions
diff --git a/sys/linux/dev_iommu.txt b/sys/linux/dev_iommu.txt
index c8422c8e0..fa70d3a15 100644
--- a/sys/linux/dev_iommu.txt
+++ b/sys/linux/dev_iommu.txt
@@ -193,6 +193,7 @@ resource device_handle[int32]
resource hwpt_handle[int32]
resource fd_access[fd]
resource access_pages_handle[int32]
+resource selftest_device_handle[int32]
ioctl$IOMMU_TEST_OP_ADD_RESERVED(fd fd_iommufd, cmd const[IOMMU_TEST_CMD], arg ptr[in, iommu_test_cmd$add_reserved])
ioctl$IOMMU_TEST_OP_MOCK_DOMAIN(fd fd_iommufd, cmd const[IOMMU_TEST_CMD], arg ptr[in, iommu_test_cmd$mock_domain])
@@ -225,14 +226,15 @@ iommu_test_cmd$mock_domain {
op const[IOMMU_TEST_OP_MOCK_DOMAIN, int32]
id ioas_handle
__reserved const[0x0, int32]
- out_device_id device_handle (out)
+ out_stdev_id selftest_device_handle (out)
out_hwpt_id hwpt_handle (out)
+ out_idev_id device_handle (out)
} [size[IOMMU_TEST_CMD_SIZE]]
iommu_test_cmd$md_check_map {
size len[parent, int32]
op const[IOMMU_TEST_OP_MD_CHECK_MAP, int32]
- id fd_access
+ id hwpt_handle
__reserved const[0x0, int32]
iova int64
length len[uptr, int64]
@@ -242,7 +244,7 @@ iommu_test_cmd$md_check_map {
iommu_test_cmd$md_check_refs {
size len[parent, int32]
op const[IOMMU_TEST_OP_MD_CHECK_REFS, int32]
- id fd_access
+ id const[0x0, int32]
__reserved const[0x0, int32]
length len[uptr, int64]
uptr ptr64[in, array[int8]]
@@ -329,9 +331,10 @@ iommu_test_cmd$memory_limit {
iommu_test_cmd$mock_domain_replace {
size len[parent, int32]
op const[IOMMU_TEST_OP_MOCK_DOMAIN_REPLACE, int32]
- id ioas_handle
+ id selftest_device_handle
__reserved const[0x0, int32]
- pt_id int32
+# or hwpt_handle
+ pt_id ioas_handle
} [size[IOMMU_TEST_CMD_SIZE]]
iommu_test_cmd$access_replace_ioas {
@@ -339,7 +342,7 @@ iommu_test_cmd$access_replace_ioas {
op const[IOMMU_TEST_OP_ACCESS_REPLACE_IOAS, int32]
id fd_access
__reserved const[0x0, int32]
- ioas_id int32
+ ioas_id ioas_handle
} [size[IOMMU_TEST_CMD_SIZE]]
iommu_destroy$device {