Re: [RFC v2 2/7] vduse: add vq group support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 8/7/25 1:57 PM, Eugenio Pérez wrote:
diff --git a/include/uapi/linux/vduse.h b/include/uapi/linux/vduse.h
index 9a56d0416bfe..b4b139dc76bb 100644
--- a/include/uapi/linux/vduse.h
+++ b/include/uapi/linux/vduse.h
@@ -31,6 +31,7 @@
   * @features: virtio features
   * @vq_num: the number of virtqueues
   * @vq_align: the allocation alignment of virtqueue's metadata
+ * @ngroups: number of vq groups that VDUSE device declares
   * @reserved: for future use, needs to be initialized to zero
   * @config_size: the size of the configuration space
   * @config: the buffer of the configuration space
@@ -45,7 +46,8 @@ struct vduse_dev_config {
  	__u64 features;
  	__u32 vq_num;
  	__u32 vq_align;
-	__u32 reserved[13];
+	__u32 ngroups; /* if VDUSE_API_VERSION >= 1 */
+	__u32 reserved[12];
  	__u32 config_size;
  	__u8 config[];
  };
@@ -160,6 +162,16 @@ struct vduse_vq_state_packed {
  	__u16 last_used_idx;
  };
+/**
+ * struct vduse_vq_group - virtqueue group
+ * @num: Index of the virtqueue group
+ * @num: Group
+ */
+struct vduse_vq_group {
+	__u32 index;
+	__u32 num;
+};
+
  /**
   * struct vduse_vq_info - information of a virtqueue
   * @index: virtqueue index
@@ -182,6 +194,7 @@ struct vduse_vq_info {
  	union {
  		struct vduse_vq_state_split split;
  		struct vduse_vq_state_packed packed;
+		struct vduse_vq_group group;
  	};
  	__u8 ready;
  };
@@ -274,6 +287,8 @@ enum vduse_req_type {
  	VDUSE_GET_VQ_STATE,
  	VDUSE_SET_STATUS,
  	VDUSE_UPDATE_IOTLB,
+	VDUSE_GET_VQ_GROUP,
+	VDUSE_GET_VRING_DESC_GROUP,
  };
/**
@@ -328,6 +343,7 @@ struct vduse_dev_request {
  		struct vduse_vq_state vq_state;
  		struct vduse_dev_status s;
  		struct vduse_iova_range iova;
+		struct vduse_vq_group vq_group; /* Only if vduse api version >= 1 */
  		__u32 padding[32];
  	};
  };
@@ -350,6 +366,7 @@ struct vduse_dev_response {
  	__u32 reserved[4];
  	union {
  		struct vduse_vq_state vq_state;
+		struct vduse_vq_group vq_group; /* Only if vduse api version >= 1 */
  		__u32 padding[32];
  	};
  };

Same comment as for patch 5, padding should be updated.

Regards,
Maxime





[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux