[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v8 11/21] vhost: Update kernel headers
From: |
Eugenio Pérez |
Subject: |
[RFC PATCH v8 11/21] vhost: Update kernel headers |
Date: |
Thu, 19 May 2022 21:12:56 +0200 |
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 5d99e7c242..d42eb46efd 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)
@@ -154,6 +149,26 @@
/* Get the config size */
#define VHOST_VDPA_GET_CONFIG_SIZE _IOR(VHOST_VIRTIO, 0x79, __u32)
+/* Get the number of virtqueue groups. */
+#define VHOST_VDPA_GET_GROUP_NUM _IOR(VHOST_VIRTIO, 0x7A, unsigned int)
+
+/* Get the number of address spaces. */
+#define VHOST_VDPA_GET_AS_NUM _IOR(VHOST_VIRTIO, 0x7B, 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, 0x7C, \
+ 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, 0x7D, \
+ struct vhost_vring_state)
+
/* Get the count of all virtqueues */
#define VHOST_VDPA_GET_VQS_COUNT _IOR(VHOST_VIRTIO, 0x80, __u32)
--
2.27.0
- [RFC PATCH v8 00/21] Net Control VQ support with asid in vDPA SVQ, Eugenio Pérez, 2022/05/19
- [RFC PATCH v8 02/21] vhost: Add custom used buffer callback, Eugenio Pérez, 2022/05/19
- [RFC PATCH v8 01/21] virtio-net: Expose ctrl virtqueue logic, Eugenio Pérez, 2022/05/19
- [RFC PATCH v8 03/21] vdpa: control virtqueue support on shadow virtqueue, Eugenio Pérez, 2022/05/19
- [RFC PATCH v8 04/21] virtio: Make virtqueue_alloc_element non-static, Eugenio Pérez, 2022/05/19
- [RFC PATCH v8 05/21] vhost: Add vhost_iova_tree_find, Eugenio Pérez, 2022/05/19
- [RFC PATCH v8 06/21] vdpa: Add map/unmap operation callback to SVQ, Eugenio Pérez, 2022/05/19
- [RFC PATCH v8 07/21] vhost: move descriptor translation to vhost_svq_vring_write_descs, Eugenio Pérez, 2022/05/19
- [RFC PATCH v8 08/21] vhost: Add SVQElement, Eugenio Pérez, 2022/05/19
- [RFC PATCH v8 09/21] vhost: Add svq copy desc mode, Eugenio Pérez, 2022/05/19
- [RFC PATCH v8 11/21] vhost: Update kernel headers,
Eugenio Pérez <=
- [RFC PATCH v8 10/21] vhost: Add vhost_svq_inject, Eugenio Pérez, 2022/05/19
- [RFC PATCH v8 12/21] vdpa: delay set_vring_ready after DRIVER_OK, Eugenio Pérez, 2022/05/19
- [RFC PATCH v8 13/21] vhost: Add ShadowVirtQueueStart operation, Eugenio Pérez, 2022/05/19
- [RFC PATCH v8 14/21] vhost: Make possible to check for device exclusive vq group, Eugenio Pérez, 2022/05/19
- [RFC PATCH v8 16/21] vdpa: Add vhost_vdpa_start_control_svq, Eugenio Pérez, 2022/05/19
- [RFC PATCH v8 17/21] vdpa: Add asid attribute to vdpa device, Eugenio Pérez, 2022/05/19
- [RFC PATCH v8 18/21] vdpa: Extract get features part from vhost_vdpa_get_max_queue_pairs, Eugenio Pérez, 2022/05/19
- [RFC PATCH v8 21/21] vdpa: Add x-cvq-svq, Eugenio Pérez, 2022/05/19
- [RFC PATCH v8 15/21] vhost: add vhost_svq_poll, Eugenio Pérez, 2022/05/19
- [RFC PATCH v8 19/21] vhost: Add reference counting to vhost_iova_tree, Eugenio Pérez, 2022/05/19