[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 01/40] linux-headers: add vhost_types.h and vhost.h
From: |
Si-Wei Liu |
Subject: |
[PATCH 01/40] linux-headers: add vhost_types.h and vhost.h |
Date: |
Thu, 7 Dec 2023 09:39:14 -0800 |
Signed-off-by: Si-Wei Liu <si-wei.liu@oracle.com>
---
include/standard-headers/linux/vhost_types.h | 13 +++++++++++++
linux-headers/linux/vhost.h | 9 +++++++++
2 files changed, 22 insertions(+)
diff --git a/include/standard-headers/linux/vhost_types.h
b/include/standard-headers/linux/vhost_types.h
index 5ad07e1..c39199b 100644
--- a/include/standard-headers/linux/vhost_types.h
+++ b/include/standard-headers/linux/vhost_types.h
@@ -185,5 +185,18 @@ struct vhost_vdpa_iova_range {
* DRIVER_OK
*/
#define VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK 0x6
+/* Device can be resumed */
+#define VHOST_BACKEND_F_RESUME 0x5
+/* Device supports the driver enabling virtqueues both before and after
+ * DRIVER_OK
+ */
+#define VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK 0x6
+/* Device may expose the virtqueue's descriptor area, driver area and
+ * device area to a different group for ASID binding than where its
+ * buffers may reside. Requires VHOST_BACKEND_F_IOTLB_ASID.
+ */
+#define VHOST_BACKEND_F_DESC_ASID 0x7
+/* IOTLB don't flush memory mapping across device reset */
+#define VHOST_BACKEND_F_IOTLB_PERSIST 0x8
#endif
diff --git a/linux-headers/linux/vhost.h b/linux-headers/linux/vhost.h
index f5c48b6..c61c687 100644
--- a/linux-headers/linux/vhost.h
+++ b/linux-headers/linux/vhost.h
@@ -219,4 +219,13 @@
*/
#define VHOST_VDPA_RESUME _IO(VHOST_VIRTIO, 0x7E)
+/* Get the dedicated group for the descriptor table of a virtqueue:
+ * read index, write group in num.
+ * The virtqueue index is stored in the index field of vhost_vring_state.
+ * The group id for the descriptor table of this specific virtqueue
+ * is returned via num field of vhost_vring_state.
+ */
+#define VHOST_VDPA_GET_VRING_DESC_GROUP _IOWR(VHOST_VIRTIO, 0x7F,
\
+ struct vhost_vring_state)
+
#endif
--
1.8.3.1
- [PATCH 00/40] vdpa-net: improve migration downtime through descriptor ASID and persistent IOTLB, Si-Wei Liu, 2023/12/07
- [PATCH 01/40] linux-headers: add vhost_types.h and vhost.h,
Si-Wei Liu <=
- [PATCH 05/40] vdpa: populate desc_group from net_vhost_vdpa_init, Si-Wei Liu, 2023/12/07
- [PATCH 03/40] vdpa: probe descriptor group index for data vqs, Si-Wei Liu, 2023/12/07
- [PATCH 02/40] vdpa: add vhost_vdpa_get_vring_desc_group, Si-Wei Liu, 2023/12/07
- [PATCH 06/40] vhost: make svq work with gpa without iova translation, Si-Wei Liu, 2023/12/07
- [PATCH 07/40] vdpa: move around vhost_vdpa_set_address_space_id, Si-Wei Liu, 2023/12/07