diff options
| author | Hrutvik Kanabar <hrutvik@google.com> | 2022-08-25 10:13:18 +0000 |
|---|---|---|
| committer | Aleksandr Nogikh <wp32pw@gmail.com> | 2022-08-29 15:51:31 +0200 |
| commit | c00dfb7f81e91521ddc29f29f0a74af4a752f263 (patch) | |
| tree | c4d801bbdc3d21c4587362ea4c2f3b1deedf19be /sys/linux | |
| parent | 727ac763d13e356f3721f6d2078ef37be8954dad (diff) | |
sys/linux: add vDPA-based `vhost` backend syscalls
Introduced in torvalds/linux@4c8cf31885f69e86be0b5b9e6677a26797365e1d.
See https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/vhost.h.
Diffstat (limited to 'sys/linux')
| -rw-r--r-- | sys/linux/socket_vnet.txt | 27 | ||||
| -rw-r--r-- | sys/linux/socket_vnet.txt.const | 15 |
2 files changed, 42 insertions, 0 deletions
diff --git a/sys/linux/socket_vnet.txt b/sys/linux/socket_vnet.txt index d9acf6cf1..bc4c5d84d 100644 --- a/sys/linux/socket_vnet.txt +++ b/sys/linux/socket_vnet.txt @@ -62,6 +62,22 @@ ioctl$VHOST_SET_VRING_ENDIAN(fd fd_vhost, cmd const[VHOST_SET_VRING_ENDIAN], arg ioctl$VHOST_GET_VRING_ENDIAN(fd fd_vhost, cmd const[VHOST_GET_VRING_ENDIAN], arg ptr[in, vhost_vring_state]) ioctl$VHOST_SET_VRING_BUSYLOOP_TIMEOUT(fd fd_vhost, cmd const[VHOST_SET_VRING_BUSYLOOP_TIMEOUT], arg ptr[in, vhost_vring_state]) +ioctl$VHOST_VDPA_GET_DEVICE_ID(fd fd_vhost, cmd const[VHOST_VDPA_GET_DEVICE_ID], arg ptr[out, int32]) +ioctl$VHOST_VDPA_GET_STATUS(fd fd_vhost, cmd const[VHOST_VDPA_GET_STATUS], arg ptr[out, int8]) +ioctl$VHOST_VDPA_SET_STATUS(fd fd_vhost, cmd const[VHOST_VDPA_SET_STATUS], arg ptr[in, int8]) +ioctl$VHOST_VDPA_GET_CONFIG(fd fd_vhost, cmd const[VHOST_VDPA_GET_CONFIG], arg ptr[out, vhost_vdpa_config]) +ioctl$VHOST_VDPA_SET_CONFIG(fd fd_vhost, cmd const[VHOST_VDPA_SET_CONFIG], arg ptr[in, vhost_vdpa_config]) +ioctl$VHOST_VDPA_SET_VRING_ENABLE(fd fd_vhost, cmd const[VHOST_VDPA_SET_VRING_ENABLE], arg ptr[in, vhost_vring_state]) +ioctl$VHOST_VDPA_GET_VRING_NUM(fd fd_vhost, cmd const[VHOST_VDPA_GET_VRING_NUM], arg ptr[out, int16]) +ioctl$VHOST_VDPA_SET_CONFIG_CALL(fd fd_vhost, cmd const[VHOST_VDPA_SET_CONFIG_CALL], arg ptr[in, int32]) +ioctl$VHOST_VDPA_GET_IOVA_RANGE(fd fd_vhost, cmd const[VHOST_VDPA_GET_IOVA_RANGE], arg ptr[out, vhost_vdpa_iova_range]) +ioctl$VHOST_VDPA_GET_CONFIG_SIZE(fd fd_vhost, cmd const[VHOST_VDPA_GET_CONFIG_SIZE], arg ptr[out, int32]) +ioctl$VHOST_VDPA_GET_VQS_COUNT(fd fd_vhost, cmd const[VHOST_VDPA_GET_VQS_COUNT], arg ptr[out, int32]) +ioctl$VHOST_VDPA_GET_GROUP_NUM(fd fd_vhost, cmd const[VHOST_VDPA_GET_GROUP_NUM], arg ptr[out, int32]) +ioctl$VHOST_VDPA_GET_AS_NUM(fd fd_vhost, cmd const[VHOST_VDPA_GET_AS_NUM], arg ptr[out, int32]) +ioctl$VHOST_VDPA_GET_VRING_GROUP(fd fd_vhost, cmd const[VHOST_VDPA_GET_VRING_GROUP], arg ptr[inout, vhost_vring_state]) +ioctl$VHOST_VDPA_SET_GROUP_ASID(fd fd_vhost, cmd const[VHOST_VDPA_SET_GROUP_ASID], arg ptr[in, vhost_vring_state]) + sockaddr_vm { svm_family const[AF_VSOCK, int16] svm_reserved1 const[0, int16] @@ -128,6 +144,17 @@ vhost_msg_v2 { iotlb vhost_iotlb_msg } [size[VHOST_MSG_V2_SIZE]] +vhost_vdpa_config { + off int32 + len len[buf, int32] + buf array[int8] +} + +vhost_vdpa_iova_range { + first int64 + last int64 +} + define VHOST_MSG_V2_SIZE sizeof(struct vhost_msg_v2) vhost_iotlb_msg { diff --git a/sys/linux/socket_vnet.txt.const b/sys/linux/socket_vnet.txt.const index 8847983fc..314d22bf2 100644 --- a/sys/linux/socket_vnet.txt.const +++ b/sys/linux/socket_vnet.txt.const @@ -40,6 +40,21 @@ VHOST_SET_VRING_ENDIAN = 1074310931, mips64le:ppc64le:2148052755 VHOST_SET_VRING_ERR = 1074310946, mips64le:ppc64le:2148052770 VHOST_SET_VRING_KICK = 1074310944, mips64le:ppc64le:2148052768 VHOST_SET_VRING_NUM = 1074310928, mips64le:ppc64le:2148052752 +VHOST_VDPA_GET_AS_NUM = 2147790714, mips64le:ppc64le:1074048890 +VHOST_VDPA_GET_CONFIG = 2148052851, mips64le:ppc64le:1074311027 +VHOST_VDPA_GET_CONFIG_SIZE = 2147790713, mips64le:ppc64le:1074048889 +VHOST_VDPA_GET_DEVICE_ID = 2147790704, mips64le:ppc64le:1074048880 +VHOST_VDPA_GET_GROUP_NUM = 2147790721, mips64le:ppc64le:1074048897 +VHOST_VDPA_GET_IOVA_RANGE = 2148577144, mips64le:ppc64le:1074835320 +VHOST_VDPA_GET_STATUS = 2147594097, mips64le:ppc64le:1073852273 +VHOST_VDPA_GET_VQS_COUNT = 2147790720, mips64le:ppc64le:1074048896 +VHOST_VDPA_GET_VRING_GROUP = 3221794683 +VHOST_VDPA_GET_VRING_NUM = 2147659638, mips64le:ppc64le:1073917814 +VHOST_VDPA_SET_CONFIG = 1074311028, mips64le:ppc64le:2148052852 +VHOST_VDPA_SET_CONFIG_CALL = 1074048887, mips64le:ppc64le:2147790711 +VHOST_VDPA_SET_GROUP_ASID = 1074311036, mips64le:ppc64le:2148052860 +VHOST_VDPA_SET_STATUS = 1073852274, mips64le:ppc64le:2147594098 +VHOST_VDPA_SET_VRING_ENABLE = 1074311029, mips64le:ppc64le:2148052853 VHOST_VSOCK_SET_GUEST_CID = 1074311008, mips64le:ppc64le:2148052832 VHOST_VSOCK_SET_RUNNING = 1074048865, mips64le:ppc64le:2147790689 VIRTIO_ANY_LAYOUT = 134217728 |
