[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201025093404.GC189473@mtl-vdi-166.wap.labs.mlnx>
Date: Sun, 25 Oct 2020 11:34:04 +0200
From: Eli Cohen <elic@...dia.com>
To: Jason Wang <jasowang@...hat.com>
CC: "mst@...hat.com" <mst@...hat.com>,
"virtualization@...ts.linux-foundation.org"
<virtualization@...ts.linux-foundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"rob.miller@...adcom.com" <rob.miller@...adcom.com>,
"lingshan.zhu@...el.com" <lingshan.zhu@...el.com>,
"eperezma@...hat.com" <eperezma@...hat.com>,
"lulu@...hat.com" <lulu@...hat.com>,
Shahaf Shuler <shahafs@...lanox.com>,
"hanand@...inx.com" <hanand@...inx.com>,
"mhabets@...arflare.com" <mhabets@...arflare.com>,
"gdawar@...inx.com" <gdawar@...inx.com>,
"saugatm@...inx.com" <saugatm@...inx.com>,
"vmireyno@...vell.com" <vmireyno@...vell.com>,
"zhangweining@...jie.com.cn" <zhangweining@...jie.com.cn>,
"eli@...lanox.com" <eli@...lanox.com>
Subject: Re: [PATCH V4 1/3] vdpa: introduce config op to get valid iova range
On Fri, Oct 23, 2020 at 09:00:41AM +0000, Jason Wang wrote:
> This patch introduce a config op to get valid iova range from the vDPA
> device.
>
> Signed-off-by: Jason Wang <jasowang@...hat.com>
Reviewed-by: Eli Cohen <elic@...dia.com>
> ---
> include/linux/vdpa.h | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h
> index eae0bfd87d91..30bc7a7223bb 100644
> --- a/include/linux/vdpa.h
> +++ b/include/linux/vdpa.h
> @@ -52,6 +52,16 @@ struct vdpa_device {
> int nvqs;
> };
>
> +/**
> + * vDPA IOVA range - the IOVA range support by the device
> + * @first: start of the IOVA range
> + * @last: end of the IOVA range
> + */
> +struct vdpa_iova_range {
> + u64 first;
> + u64 last;
> +};
> +
> /**
> * vDPA_config_ops - operations for configuring a vDPA device.
> * Note: vDPA device drivers are required to implement all of the
> @@ -151,6 +161,10 @@ struct vdpa_device {
> * @get_generation: Get device config generation (optional)
> * @vdev: vdpa device
> * Returns u32: device generation
> + * @get_iova_range: Get supported iova range (optional)
> + * @vdev: vdpa device
> + * Returns the iova range supported by
> + * the device.
> * @set_map: Set device memory mapping (optional)
> * Needed for device that using device
> * specific DMA translation (on-chip IOMMU)
> @@ -216,6 +230,7 @@ struct vdpa_config_ops {
> void (*set_config)(struct vdpa_device *vdev, unsigned int offset,
> const void *buf, unsigned int len);
> u32 (*get_generation)(struct vdpa_device *vdev);
> + struct vdpa_iova_range (*get_iova_range)(struct vdpa_device *vdev);
>
> /* DMA ops */
> int (*set_map)(struct vdpa_device *vdev, struct vhost_iotlb *iotlb);
> --
> 2.20.1
>
Powered by blists - more mailing lists