File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,6 +52,16 @@ struct vdpa_device {
5252 int nvqs ;
5353};
5454
55+ /**
56+ * vDPA IOVA range - the IOVA range support by the device
57+ * @first: start of the IOVA range
58+ * @last: end of the IOVA range
59+ */
60+ struct vdpa_iova_range {
61+ u64 first ;
62+ u64 last ;
63+ };
64+
5565/**
5666 * vDPA_config_ops - operations for configuring a vDPA device.
5767 * Note: vDPA device drivers are required to implement all of the
@@ -151,6 +161,10 @@ struct vdpa_device {
151161 * @get_generation: Get device config generation (optional)
152162 * @vdev: vdpa device
153163 * Returns u32: device generation
164+ * @get_iova_range: Get supported iova range (optional)
165+ * @vdev: vdpa device
166+ * Returns the iova range supported by
167+ * the device.
154168 * @set_map: Set device memory mapping (optional)
155169 * Needed for device that using device
156170 * specific DMA translation (on-chip IOMMU)
@@ -216,6 +230,7 @@ struct vdpa_config_ops {
216230 void (* set_config )(struct vdpa_device * vdev , unsigned int offset ,
217231 const void * buf , unsigned int len );
218232 u32 (* get_generation )(struct vdpa_device * vdev );
233+ struct vdpa_iova_range (* get_iova_range )(struct vdpa_device * vdev );
219234
220235 /* DMA ops */
221236 int (* set_map )(struct vdpa_device * vdev , struct vhost_iotlb * iotlb );
You can’t perform that action at this time.
0 commit comments