[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v2 16/18] vhost: Update kernel headers
From: |
Eugenio Pérez |
Subject: |
[RFC PATCH v2 16/18] vhost: Update kernel headers |
Date: |
Thu, 17 Mar 2022 19:23:57 +0100 |
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
include/standard-headers/linux/vhost_types.h | 11 ++++++++-
linux-headers/linux/vhost.h | 25 ++++++++++++++++----
2 files changed, 30 insertions(+), 6 deletions(-)
diff --git a/include/standard-headers/linux/vhost_types.h
b/include/standard-headers/linux/vhost_types.h
index 0bd2684a2a..ce78551b0f 100644
--- a/include/standard-headers/linux/vhost_types.h
+++ b/include/standard-headers/linux/vhost_types.h
@@ -87,7 +87,7 @@ struct vhost_msg {
struct vhost_msg_v2 {
uint32_t type;
- uint32_t reserved;
+ uint32_t asid;
union {
struct vhost_iotlb_msg iotlb;
uint8_t padding[64];
@@ -153,4 +153,13 @@ struct vhost_vdpa_iova_range {
/* vhost-net should add virtio_net_hdr for RX, and strip for TX packets. */
#define VHOST_NET_F_VIRTIO_NET_HDR 27
+/* Use message type V2 */
+#define VHOST_BACKEND_F_IOTLB_MSG_V2 0x1
+/* IOTLB can accept batching hints */
+#define VHOST_BACKEND_F_IOTLB_BATCH 0x2
+/* IOTLB can accept address space identifier through V2 type of IOTLB
+ * message
+ */
+#define VHOST_BACKEND_F_IOTLB_ASID 0x3
+
#endif
diff --git a/linux-headers/linux/vhost.h b/linux-headers/linux/vhost.h
index c998860d7b..5e083490f1 100644
--- a/linux-headers/linux/vhost.h
+++ b/linux-headers/linux/vhost.h
@@ -89,11 +89,6 @@
/* Set or get vhost backend capability */
-/* Use message type V2 */
-#define VHOST_BACKEND_F_IOTLB_MSG_V2 0x1
-/* IOTLB can accept batching hints */
-#define VHOST_BACKEND_F_IOTLB_BATCH 0x2
-
#define VHOST_SET_BACKEND_FEATURES _IOW(VHOST_VIRTIO, 0x25, __u64)
#define VHOST_GET_BACKEND_FEATURES _IOR(VHOST_VIRTIO, 0x26, __u64)
@@ -150,4 +145,24 @@
/* Get the valid iova range */
#define VHOST_VDPA_GET_IOVA_RANGE _IOR(VHOST_VIRTIO, 0x78, \
struct vhost_vdpa_iova_range)
+/* Get the number of virtqueue groups. */
+#define VHOST_VDPA_GET_GROUP_NUM _IOR(VHOST_VIRTIO, 0x79, unsigned int)
+
+/* Get the number of address spaces. */
+#define VHOST_VDPA_GET_AS_NUM _IOR(VHOST_VIRTIO, 0x7A, unsigned int)
+
+/* Get the group for a virtqueue: read index, write group in num,
+ * The virtqueue index is stored in the index field of
+ * vhost_vring_state. The group for this specific virtqueue is
+ * returned via num field of vhost_vring_state.
+ */
+#define VHOST_VDPA_GET_VRING_GROUP _IOWR(VHOST_VIRTIO, 0x7B, \
+ struct vhost_vring_state)
+/* Set the ASID for a virtqueue group. The group index is stored in
+ * the index field of vhost_vring_state, the ASID associated with this
+ * group is stored at num field of vhost_vring_state.
+ */
+#define VHOST_VDPA_SET_GROUP_ASID _IOW(VHOST_VIRTIO, 0x7C, \
+ struct vhost_vring_state)
+
#endif
--
2.27.0
- [RFC PATCH v2 06/18] vdpa: Extract get geatures part from vhost_vdpa_get_max_queue_pairs, (continued)
- [RFC PATCH v2 06/18] vdpa: Extract get geatures part from vhost_vdpa_get_max_queue_pairs, Eugenio Pérez, 2022/03/17
- [RFC PATCH v2 07/18] virtio: Make virtqueue_alloc_element non-static, Eugenio Pérez, 2022/03/17
- [RFC PATCH v2 08/18] vhost: Add SVQElement, Eugenio Pérez, 2022/03/17
- [RFC PATCH v2 09/18] vhost: Add custom used buffer callback, Eugenio Pérez, 2022/03/17
- [RFC PATCH v2 10/18] vdpa: control virtqueue support on shadow virtqueue, Eugenio Pérez, 2022/03/17
- [RFC PATCH v2 11/18] vhost: Add vhost_iova_tree_find, Eugenio Pérez, 2022/03/17
- [RFC PATCH v2 12/18] vdpa: Add map/unmap operation callback to SVQ, Eugenio Pérez, 2022/03/17
- [RFC PATCH v2 13/18] vhost: Add vhost_svq_inject, Eugenio Pérez, 2022/03/17
- [RFC PATCH v2 14/18] vdpa: add NetClientState->start() callback, Eugenio Pérez, 2022/03/17
- [RFC PATCH v2 15/18] vdpa: Add vhost_vdpa_start_control_svq, Eugenio Pérez, 2022/03/17
- [RFC PATCH v2 16/18] vhost: Update kernel headers,
Eugenio Pérez <=
- [RFC PATCH v2 17/18] vdpa: Add asid attribute to vdpa device, Eugenio Pérez, 2022/03/17
- [RFC PATCH v2 18/18] vdpa: Add x-cvq-svq, Eugenio Pérez, 2022/03/17