vhost.h (13b1e9667737132440f4d500c31cb69320c6b15a) | vhost.h (5f69e42da5b40a2213f4db70ca461f554abca686) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2#ifndef _LINUX_VHOST_H 3#define _LINUX_VHOST_H 4/* Userspace interface for in-kernel virtio accelerators. */ 5 6/* vhost is used to reduce the number of system calls involved in virtio. 7 * 8 * Existing virtio net code is used in the guest without modification. --- 165 unchanged lines hidden (view full) --- 174#define VHOST_VDPA_SET_CONFIG_CALL _IOW(VHOST_VIRTIO, 0x77, int) 175 176/* Get the valid iova range */ 177#define VHOST_VDPA_GET_IOVA_RANGE _IOR(VHOST_VIRTIO, 0x78, \ 178 struct vhost_vdpa_iova_range) 179/* Get the config size */ 180#define VHOST_VDPA_GET_CONFIG_SIZE _IOR(VHOST_VIRTIO, 0x79, __u32) 181 | 1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2#ifndef _LINUX_VHOST_H 3#define _LINUX_VHOST_H 4/* Userspace interface for in-kernel virtio accelerators. */ 5 6/* vhost is used to reduce the number of system calls involved in virtio. 7 * 8 * Existing virtio net code is used in the guest without modification. --- 165 unchanged lines hidden (view full) --- 174#define VHOST_VDPA_SET_CONFIG_CALL _IOW(VHOST_VIRTIO, 0x77, int) 175 176/* Get the valid iova range */ 177#define VHOST_VDPA_GET_IOVA_RANGE _IOR(VHOST_VIRTIO, 0x78, \ 178 struct vhost_vdpa_iova_range) 179/* Get the config size */ 180#define VHOST_VDPA_GET_CONFIG_SIZE _IOR(VHOST_VIRTIO, 0x79, __u32) 181 |
182/* Get the count of all virtqueues */ 183#define VHOST_VDPA_GET_VQS_COUNT _IOR(VHOST_VIRTIO, 0x80, __u32) 184 185/* Get the number of virtqueue groups. */ 186#define VHOST_VDPA_GET_GROUP_NUM _IOR(VHOST_VIRTIO, 0x81, __u32) 187 | |
188/* Get the number of address spaces. */ 189#define VHOST_VDPA_GET_AS_NUM _IOR(VHOST_VIRTIO, 0x7A, unsigned int) 190 191/* Get the group for a virtqueue: read index, write group in num, 192 * The virtqueue index is stored in the index field of 193 * vhost_vring_state. The group for this specific virtqueue is 194 * returned via num field of vhost_vring_state. 195 */ --- 27 unchanged lines hidden (view full) --- 223 * of a virtqueue: read index, write group in num. 224 * The virtqueue index is stored in the index field of vhost_vring_state. 225 * The group ID of the descriptor table for this specific virtqueue 226 * is returned via num field of vhost_vring_state. 227 */ 228#define VHOST_VDPA_GET_VRING_DESC_GROUP _IOWR(VHOST_VIRTIO, 0x7F, \ 229 struct vhost_vring_state) 230 | 182/* Get the number of address spaces. */ 183#define VHOST_VDPA_GET_AS_NUM _IOR(VHOST_VIRTIO, 0x7A, unsigned int) 184 185/* Get the group for a virtqueue: read index, write group in num, 186 * The virtqueue index is stored in the index field of 187 * vhost_vring_state. The group for this specific virtqueue is 188 * returned via num field of vhost_vring_state. 189 */ --- 27 unchanged lines hidden (view full) --- 217 * of a virtqueue: read index, write group in num. 218 * The virtqueue index is stored in the index field of vhost_vring_state. 219 * The group ID of the descriptor table for this specific virtqueue 220 * is returned via num field of vhost_vring_state. 221 */ 222#define VHOST_VDPA_GET_VRING_DESC_GROUP _IOWR(VHOST_VIRTIO, 0x7F, \ 223 struct vhost_vring_state) 224 |
225 226/* Get the count of all virtqueues */ 227#define VHOST_VDPA_GET_VQS_COUNT _IOR(VHOST_VIRTIO, 0x80, __u32) 228 229/* Get the number of virtqueue groups. */ 230#define VHOST_VDPA_GET_GROUP_NUM _IOR(VHOST_VIRTIO, 0x81, __u32) 231 |
|
231/* Get the queue size of a specific virtqueue. 232 * userspace set the vring index in vhost_vring_state.index 233 * kernel set the queue size in vhost_vring_state.num 234 */ | 232/* Get the queue size of a specific virtqueue. 233 * userspace set the vring index in vhost_vring_state.index 234 * kernel set the queue size in vhost_vring_state.num 235 */ |
235#define VHOST_VDPA_GET_VRING_SIZE _IOWR(VHOST_VIRTIO, 0x80, \ | 236#define VHOST_VDPA_GET_VRING_SIZE _IOWR(VHOST_VIRTIO, 0x82, \ |
236 struct vhost_vring_state) 237#endif | 237 struct vhost_vring_state) 238#endif |