sys/linux: descriptions for /dev/vmci

This commit is contained in:
Radoslav Gerganov 2020-09-01 15:25:20 +03:00 committed by Dmitry Vyukov
parent 54289b0835
commit 4a006f636c
6 changed files with 180 additions and 4 deletions

View File

@ -2334,7 +2334,7 @@ CONFIG_EEPROM_93CX6=y
# CONFIG_INTEL_MEI_TXE is not set
# CONFIG_INTEL_MEI_VIRTIO is not set
# CONFIG_INTEL_MEI_HDCP is not set
# CONFIG_VMWARE_VMCI is not set
CONFIG_VMWARE_VMCI=y
#
# Intel MIC & related support

View File

@ -2341,7 +2341,7 @@ CONFIG_EEPROM_93CX6=y
# CONFIG_INTEL_MEI_ME is not set
# CONFIG_INTEL_MEI_TXE is not set
# CONFIG_INTEL_MEI_HDCP is not set
# CONFIG_VMWARE_VMCI is not set
CONFIG_VMWARE_VMCI=y
#
# Intel MIC & related support

View File

@ -2239,7 +2239,7 @@ CONFIG_EEPROM_93CX6=y
# CONFIG_INTEL_MEI_ME is not set
# CONFIG_INTEL_MEI_TXE is not set
# CONFIG_INTEL_MEI_HDCP is not set
# CONFIG_VMWARE_VMCI is not set
CONFIG_VMWARE_VMCI=y
#
# Intel MIC & related support

View File

@ -2235,7 +2235,7 @@ CONFIG_EEPROM_93CX6=y
# CONFIG_INTEL_MEI_ME is not set
# CONFIG_INTEL_MEI_TXE is not set
# CONFIG_INTEL_MEI_HDCP is not set
# CONFIG_VMWARE_VMCI is not set
CONFIG_VMWARE_VMCI=y
#
# Intel MIC & related support

130
sys/linux/vmw_vmci.txt Normal file
View File

@ -0,0 +1,130 @@
# Copyright 2020 syzkaller project authors. All rights reserved.
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
include <linux/ioctl.h>
include <linux/vmw_vmci_defs.h>
resource fd_vmci[fd]
openat$vmci(fd const[AT_FDCWD], file ptr[in, string["/dev/vmci"]], flags const[O_RDWR], mode const[0]) fd_vmci
ioctl$IOCTL_VMCI_INIT_CONTEXT(fd fd_vmci, cmd const[IOCTL_VMCI_INIT_CONTEXT], arg ptr[in, vmci_init_blk])
ioctl$IOCTL_VMCI_DATAGRAM_SEND(fd fd_vmci, cmd const[IOCTL_VMCI_DATAGRAM_SEND], arg ptr[in, vmci_datagram_snd_rcv_info])
ioctl$IOCTL_VMCI_DATAGRAM_RECEIVE(fd fd_vmci, cmd const[IOCTL_VMCI_DATAGRAM_RECEIVE], arg ptr[in, vmci_datagram_snd_rcv_info])
ioctl$IOCTL_VMCI_QUEUEPAIR_ALLOC(fd fd_vmci, cmd const[IOCTL_VMCI_QUEUEPAIR_ALLOC], arg ptr[in, vmci_qp_alloc_info])
ioctl$IOCTL_VMCI_QUEUEPAIR_SETVA(fd fd_vmci, cmd const[IOCTL_VMCI_QUEUEPAIR_SETVA], arg ptr[in, vmci_qp_set_va_info])
ioctl$IOCTL_VMCI_QUEUEPAIR_SETPF(fd fd_vmci, cmd const[IOCTL_VMCI_QUEUEPAIR_SETPAGEFILE], arg ptr[in, vmci_qp_page_file_info])
ioctl$IOCTL_VMCI_QUEUEPAIR_DETACH(fd fd_vmci, cmd const[IOCTL_VMCI_QUEUEPAIR_DETACH], arg ptr[in, vmci_qp_dtch_info])
ioctl$IOCTL_VMCI_CTX_ADD_NOTIFICATION(fd fd_vmci, cmd const[IOCTL_VMCI_CTX_ADD_NOTIFICATION], arg ptr[in, vmci_ctx_info])
ioctl$IOCTL_VMCI_CTX_REMOVE_NOTIFICATION(fd fd_vmci, cmd const[IOCTL_VMCI_CTX_REMOVE_NOTIFICATION], arg ptr[in, vmci_ctx_info])
ioctl$IOCTL_VMCI_CTX_GET_CPT_STATE(fd fd_vmci, cmd const[IOCTL_VMCI_CTX_GET_CPT_STATE], arg ptr[in, vmci_ctx_chkpt_buf_info])
ioctl$IOCTL_VMCI_CTX_SET_CPT_STATE(fd fd_vmci, cmd const[IOCTL_VMCI_CTX_SET_CPT_STATE], arg ptr[in, vmci_ctx_chkpt_buf_info])
ioctl$IOCTL_VMCI_GET_CONTEXT_ID(fd fd_vmci, cmd const[IOCTL_VMCI_GET_CONTEXT_ID], arg ptr[out, int32])
ioctl$IOCTL_VMCI_SET_NOTIFY(fd fd_vmci, cmd const[IOCTL_VMCI_SET_NOTIFY], arg ptr[in, vmci_set_notify_info])
ioctl$IOCTL_VMCI_NOTIFY_RESOURCE(fd fd_vmci, cmd const[IOCTL_VMCI_NOTIFY_RESOURCE], arg ptr[in, vmci_dbell_notify_resource_info])
ioctl$IOCTL_VMCI_NOTIFICATIONS_RECEIVE(fd fd_vmci, cmd const[IOCTL_VMCI_NOTIFICATIONS_RECEIVE], arg ptr[in, vmci_ctx_notify_recv_info])
ioctl$IOCTL_VMCI_VERSION(fd fd_vmci, cmd const[IOCTL_VMCI_VERSION], arg ptr[in, flags[vmci_version, int32]])
ioctl$IOCTL_VMCI_VERSION2(fd fd_vmci, cmd const[IOCTL_VMCI_VERSION2], arg ptr[in, flags[vmci_version, int32]])
vmci_init_blk {
cid vmaddr_cid
flags flags[vmci_privilege, int32]
}
vmci_handle {
context vmaddr_cid
rsc int32
}
vmci_datagram {
dst vmci_handle
src vmci_handle
payload_size len[payload, int64]
payload array[int8, 1024]
}
vmci_datagram_snd_rcv_info {
addr ptr[in, vmci_datagram]
len len[addr, int32]
result int32
}
vmci_qp_alloc_info {
handle vmci_handle
peer vmaddr_cid
flags flags[vmci_qp, int32]
produce_size int64
consume_size int64
ppn_va int64
num_ppns int64
result int32
version int32
}
vmci_qp_set_va_info {
handle vmci_handle
va int64
num_ppns int64
version int32
result int32
}
vmci_qp_page_file_info {
handle vmci_handle
produce_page_file int64
consume_page_file int64
produce_page_file_size int64
consume_page_file_size int64
result int32
version int32
produce_va int64
consume_va int64
}
vmci_qp_dtch_info {
handle vmci_handle
result int32
_pad int32
}
vmci_ctx_info {
remote_cid vmaddr_cid
result int32
}
vmci_ctx_chkpt_buf_info {
cpt_buf ptr[in, array[int32, 1024]]
cpt_type flags[vmci_cpt_state, int32]
buf_size len[cpt_buf, int32]
result int32
_pad int32
}
vmci_set_notify_info {
notify_uva int64
result int32
_pad int32
}
vmci_dbell_notify_resource_info {
handle vmci_handle
rsc flags[vmci_notify_resource, int16]
action flags[vmci_notify_action, int16]
result int32
}
vmci_ctx_notify_recv_info {
db_handle_buf_uva int64
db_handle_buf_size int64
qp_handle_buf_uva int64
qp_handle_buf_size int64
result int32
_pad int32
}
vmci_privilege = VMCI_NO_PRIVILEGE_FLAGS, VMCI_PRIVILEGE_FLAG_RESTRICTED, VMCI_PRIVILEGE_FLAG_TRUSTED
vmci_qp = VMCI_QPFLAG_ATTACH_ONLY, VMCI_QPFLAG_LOCAL, VMCI_QPFLAG_NONBLOCK, VMCI_QPFLAG_PINNED
vmci_version = VMCI_VERSION_NOVMVM, VMCI_VERSION_NOTIFY, VMCI_VERSION_HOSTQP, VMCI_VERSION_PREHOSTQP, VMCI_VERSION_PREVERS2
vmci_cpt_state = VMCI_NOTIFICATION_CPT_STATE, VMCI_WELLKNOWN_CPT_STATE, VMCI_DG_OUT_STATE, VMCI_DG_IN_STATE, VMCI_DG_IN_SIZE_STATE, VMCI_DOORBELL_CPT_STATE
vmci_notify_resource = VMCI_NOTIFY_RESOURCE_QUEUE_PAIR, VMCI_NOTIFY_RESOURCE_DOOR_BELL
vmci_notify_action = VMCI_NOTIFY_RESOURCE_ACTION_NOTIFY, VMCI_NOTIFY_RESOURCE_ACTION_CREATE, VMCI_NOTIFY_RESOURCE_ACTION_DESTROY

View File

@ -0,0 +1,46 @@
# Code generated by syz-sysgen. DO NOT EDIT.
arches = 386, amd64, arm, arm64, mips64le, ppc64le, riscv64, s390x
AT_FDCWD = 18446744073709551516
IOCTL_VMCI_CTX_ADD_NOTIFICATION = 1967, mips64le:ppc64le:536872879
IOCTL_VMCI_CTX_GET_CPT_STATE = 1969, mips64le:ppc64le:536872881
IOCTL_VMCI_CTX_REMOVE_NOTIFICATION = 1968, mips64le:ppc64le:536872880
IOCTL_VMCI_CTX_SET_CPT_STATE = 1970, mips64le:ppc64le:536872882
IOCTL_VMCI_DATAGRAM_RECEIVE = 1964, mips64le:ppc64le:536872876
IOCTL_VMCI_DATAGRAM_SEND = 1963, mips64le:ppc64le:536872875
IOCTL_VMCI_GET_CONTEXT_ID = 1971, mips64le:ppc64le:536872883
IOCTL_VMCI_INIT_CONTEXT = 1952, mips64le:ppc64le:536872864
IOCTL_VMCI_NOTIFICATIONS_RECEIVE = 1958, mips64le:ppc64le:536872870
IOCTL_VMCI_NOTIFY_RESOURCE = 1957, mips64le:ppc64le:536872869
IOCTL_VMCI_QUEUEPAIR_ALLOC = 1960, mips64le:ppc64le:536872872
IOCTL_VMCI_QUEUEPAIR_DETACH = 1962, mips64le:ppc64le:536872874
IOCTL_VMCI_QUEUEPAIR_SETPAGEFILE = 1961, mips64le:ppc64le:536872873
IOCTL_VMCI_QUEUEPAIR_SETVA = 1956, mips64le:ppc64le:536872868
IOCTL_VMCI_SET_NOTIFY = 1995, mips64le:ppc64le:536872907
IOCTL_VMCI_VERSION = 1951, mips64le:ppc64le:536872863
IOCTL_VMCI_VERSION2 = 1959, mips64le:ppc64le:536872871
O_RDWR = 2
VMCI_DG_IN_SIZE_STATE = 5
VMCI_DG_IN_STATE = 4
VMCI_DG_OUT_STATE = 3
VMCI_DOORBELL_CPT_STATE = 6
VMCI_NOTIFICATION_CPT_STATE = 1
VMCI_NOTIFY_RESOURCE_ACTION_CREATE = 1
VMCI_NOTIFY_RESOURCE_ACTION_DESTROY = 2
VMCI_NOTIFY_RESOURCE_ACTION_NOTIFY = 0
VMCI_NOTIFY_RESOURCE_DOOR_BELL = 1
VMCI_NOTIFY_RESOURCE_QUEUE_PAIR = 0
VMCI_NO_PRIVILEGE_FLAGS = 0
VMCI_PRIVILEGE_FLAG_RESTRICTED = 1
VMCI_PRIVILEGE_FLAG_TRUSTED = 2
VMCI_QPFLAG_ATTACH_ONLY = 1
VMCI_QPFLAG_LOCAL = 2
VMCI_QPFLAG_NONBLOCK = 4
VMCI_QPFLAG_PINNED = 8
VMCI_VERSION_HOSTQP = 589824
VMCI_VERSION_NOTIFY = 655360
VMCI_VERSION_NOVMVM = 720896
VMCI_VERSION_PREHOSTQP = 524288
VMCI_VERSION_PREVERS2 = 65536
VMCI_WELLKNOWN_CPT_STATE = 2
__NR_ioctl = 54, amd64:16, arm64:riscv64:29, mips64le:5015
__NR_openat = 56, 386:295, amd64:257, arm:322, mips64le:5247, ppc64le:286, s390x:288