Skip to content

Commit 8dea3b6

Browse files
stefano-garzarellajiangliu
authored andcommitted
vhost_kern: add VHOST_BACKEND ioctls and flags
vhost-kern support these ioctls to set/get backend features related to IOTLB message support. Signed-off-by: Stefano Garzarella <[email protected]>
1 parent 81dd5a9 commit 8dea3b6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/vhost_kern/vhost_binding.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ pub const VHOST_VRING_BIG_ENDIAN: raw::c_uint = 1;
3838
pub const VHOST_F_LOG_ALL: raw::c_uint = 26;
3939
pub const VHOST_NET_F_VIRTIO_NET_HDR: raw::c_uint = 27;
4040
pub const VHOST_SCSI_ABI_VERSION: raw::c_uint = 1;
41+
pub const VHOST_BACKEND_F_IOTLB_MSG_V2: raw::c_ulonglong = 0x1;
42+
pub const VHOST_BACKEND_F_IOTLB_BATCH: raw::c_ulonglong = 0x2;
4143

4244
ioctl_ior_nr!(VHOST_GET_FEATURES, VHOST, 0x00, raw::c_ulonglong);
4345
ioctl_iow_nr!(VHOST_SET_FEATURES, VHOST, 0x00, raw::c_ulonglong);
@@ -53,6 +55,8 @@ ioctl_iowr_nr!(VHOST_GET_VRING_BASE, VHOST, 0x12, vhost_vring_state);
5355
ioctl_iow_nr!(VHOST_SET_VRING_KICK, VHOST, 0x20, vhost_vring_file);
5456
ioctl_iow_nr!(VHOST_SET_VRING_CALL, VHOST, 0x21, vhost_vring_file);
5557
ioctl_iow_nr!(VHOST_SET_VRING_ERR, VHOST, 0x22, vhost_vring_file);
58+
ioctl_iow_nr!(VHOST_SET_BACKEND_FEATURES, VHOST, 0x25, raw::c_ulonglong);
59+
ioctl_ior_nr!(VHOST_GET_BACKEND_FEATURES, VHOST, 0x26, raw::c_ulonglong);
5660
ioctl_iow_nr!(VHOST_NET_SET_BACKEND, VHOST, 0x30, vhost_vring_file);
5761
ioctl_iow_nr!(VHOST_SCSI_SET_ENDPOINT, VHOST, 0x40, vhost_scsi_target);
5862
ioctl_iow_nr!(VHOST_SCSI_CLEAR_ENDPOINT, VHOST, 0x41, vhost_scsi_target);

0 commit comments

Comments
 (0)