All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: shahafs@mellanox.com, lulu@redhat.com, saugatm@xilinx.com,
	mhabets@solarflare.com, vmireyno@marvell.com,
	linux-kernel@vger.kernel.org, gdawar@xilinx.com,
	virtualization@lists.linux-foundation.org, eperezma@redhat.com,
	hanand@xilinx.com, zhangweining@ruijie.com.cn, eli@mellanox.com,
	lingshan.zhu@intel.com, rob.miller@broadcom.com
Subject: Re: [PATCH 1/4] vdpa: introduce config op to get valid iova range
Date: Wed, 5 Aug 2020 08:51:56 -0400	[thread overview]
Message-ID: <20200805085035-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20200617032947.6371-2-jasowang@redhat.com>

On Wed, Jun 17, 2020 at 11:29:44AM +0800, Jason Wang wrote:
> This patch introduce a config op to get valid iova range from the vDPA
> device.
> 
> Signed-off-by: Jason Wang <jasowang@redhat.com>
> ---
>  include/linux/vdpa.h | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h
> index 239db794357c..b7633ed2500c 100644
> --- a/include/linux/vdpa.h
> +++ b/include/linux/vdpa.h
> @@ -41,6 +41,16 @@ struct vdpa_device {
>  	unsigned int index;
>  };
>  
> +/**
> + * vDPA IOVA range - the IOVA range support by the device
> + * @start: start of the IOVA range
> + * @end: end of the IOVA range
> + */
> +struct vdpa_iova_range {
> +	u64 start;
> +	u64 end;
> +};
> +


This is ambiguous. Is end in the range or just behind it?
How about first/last?



>  /**
>   * vDPA_config_ops - operations for configuring a vDPA device.
>   * Note: vDPA device drivers are required to implement all of the
> @@ -134,6 +144,9 @@ struct vdpa_device {
>   * @get_generation:		Get device config generation (optional)
>   *				@vdev: vdpa device
>   *				Returns u32: device generation
> + * @get_iova_range:		Get supported iova range (on-chip IOMMU)
> + *				@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)
> @@ -195,6 +208,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

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: virtualization@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, rob.miller@broadcom.com,
	lingshan.zhu@intel.com, eperezma@redhat.com, lulu@redhat.com,
	shahafs@mellanox.com, hanand@xilinx.com, mhabets@solarflare.com,
	gdawar@xilinx.com, saugatm@xilinx.com, vmireyno@marvell.com,
	zhangweining@ruijie.com.cn, eli@mellanox.com
Subject: Re: [PATCH 1/4] vdpa: introduce config op to get valid iova range
Date: Wed, 5 Aug 2020 08:51:56 -0400	[thread overview]
Message-ID: <20200805085035-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20200617032947.6371-2-jasowang@redhat.com>

On Wed, Jun 17, 2020 at 11:29:44AM +0800, Jason Wang wrote:
> This patch introduce a config op to get valid iova range from the vDPA
> device.
> 
> Signed-off-by: Jason Wang <jasowang@redhat.com>
> ---
>  include/linux/vdpa.h | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h
> index 239db794357c..b7633ed2500c 100644
> --- a/include/linux/vdpa.h
> +++ b/include/linux/vdpa.h
> @@ -41,6 +41,16 @@ struct vdpa_device {
>  	unsigned int index;
>  };
>  
> +/**
> + * vDPA IOVA range - the IOVA range support by the device
> + * @start: start of the IOVA range
> + * @end: end of the IOVA range
> + */
> +struct vdpa_iova_range {
> +	u64 start;
> +	u64 end;
> +};
> +


This is ambiguous. Is end in the range or just behind it?
How about first/last?



>  /**
>   * vDPA_config_ops - operations for configuring a vDPA device.
>   * Note: vDPA device drivers are required to implement all of the
> @@ -134,6 +144,9 @@ struct vdpa_device {
>   * @get_generation:		Get device config generation (optional)
>   *				@vdev: vdpa device
>   *				Returns u32: device generation
> + * @get_iova_range:		Get supported iova range (on-chip IOMMU)
> + *				@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)
> @@ -195,6 +208,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


  reply	other threads:[~2020-08-05 12:52 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-17  3:29 [PATCH 0/4] vDPA: API for reporting IOVA range Jason Wang
2020-06-17  3:29 ` Jason Wang
2020-06-17  3:29 ` [PATCH 1/4] vdpa: introduce config op to get valid iova range Jason Wang
2020-06-17  3:29   ` Jason Wang
2020-08-05 12:51   ` Michael S. Tsirkin [this message]
2020-08-05 12:51     ` Michael S. Tsirkin
2020-08-06  3:25     ` Jason Wang
2020-08-06  3:25       ` Jason Wang
2020-08-06  5:54       ` Michael S. Tsirkin
2020-08-06  5:54         ` Michael S. Tsirkin
2020-08-06 12:03     ` Eli Cohen
2020-08-06 12:29       ` Michael S. Tsirkin
2020-08-06 12:29         ` Michael S. Tsirkin
2020-08-06 12:43         ` Eli Cohen
2020-08-10 12:05           ` Michael S. Tsirkin
2020-08-10 12:05             ` Michael S. Tsirkin
2020-08-11  2:53             ` Jason Wang
2020-08-11  2:53               ` Jason Wang
2020-08-11  8:29               ` Michael S. Tsirkin
2020-08-11  8:29                 ` Michael S. Tsirkin
2020-08-12  2:02                 ` Jason Wang
2020-08-12  2:02                   ` Jason Wang
2020-08-07  3:23         ` Jason Wang
2020-08-07  3:23           ` Jason Wang
2020-08-06 12:10   ` Eli Cohen
2020-08-07  3:04     ` Jason Wang
2020-08-07  3:04       ` Jason Wang
2020-06-17  3:29 ` [PATCH 2/4] vdpa_sim: implement get_iova_range bus operation Jason Wang
2020-06-17  3:29   ` Jason Wang
2020-06-17  3:29 ` [PATCH 3/4] vdpa: get_iova_range() is mandatory for device specific DMA translation Jason Wang
2020-06-17  3:29   ` Jason Wang
2020-08-05 12:55   ` Michael S. Tsirkin
2020-08-05 12:55     ` Michael S. Tsirkin
2020-08-06  3:27     ` Jason Wang
2020-08-06  3:27       ` Jason Wang
2020-06-17  3:29 ` [PATCH 4/4] vhost: vdpa: report iova range Jason Wang
2020-08-05 12:58   ` Michael S. Tsirkin
2020-08-05 12:58     ` Michael S. Tsirkin
2020-08-06  3:29     ` Jason Wang
2020-08-06  3:29       ` Jason Wang
2020-08-06  5:55       ` Michael S. Tsirkin
2020-08-06  5:55         ` Michael S. Tsirkin
2020-10-21 14:45 ` [PATCH 0/4] vDPA: API for reporting IOVA range Michael S. Tsirkin
2020-10-21 14:45   ` Michael S. Tsirkin
2020-10-22  5:47   ` Jason Wang
2020-10-22  5:47     ` Jason Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200805085035-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=eli@mellanox.com \
    --cc=eperezma@redhat.com \
    --cc=gdawar@xilinx.com \
    --cc=hanand@xilinx.com \
    --cc=jasowang@redhat.com \
    --cc=lingshan.zhu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lulu@redhat.com \
    --cc=mhabets@solarflare.com \
    --cc=rob.miller@broadcom.com \
    --cc=saugatm@xilinx.com \
    --cc=shahafs@mellanox.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=vmireyno@marvell.com \
    --cc=zhangweining@ruijie.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.