virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: mst@redhat.com, jasowang@redhat.com
Cc: gdawar@amd.com, elic@nvidia.com, linux-kernel@vger.kernel.org,
	tanuj.kamde@amd.com, virtualization@lists.linux-foundation.org
Subject: [PATCH 2/5] vdpa: introduce get_vq_dma_device()
Date: Wed, 11 Jan 2023 14:28:06 +0800	[thread overview]
Message-ID: <20230111062809.25020-3-jasowang@redhat.com> (raw)
In-Reply-To: <20230111062809.25020-1-jasowang@redhat.com>

This patch introduces a new method to query the dma device that is use
for a specific virtqueue.

Signed-off-by: Jason Wang <jasowang@redhat.com>
---
 include/linux/vdpa.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h
index 6d0f5e4e82c2..3ec13aee35f5 100644
--- a/include/linux/vdpa.h
+++ b/include/linux/vdpa.h
@@ -282,6 +282,11 @@ struct vdpa_map_file {
  *				@iova: iova to be unmapped
  *				@size: size of the area
  *				Returns integer: success (0) or error (< 0)
+ * @get_vq_dma_dev:		Get the dma device for a specific
+ *				virtqueue (optional)
+ *				@vdev: vdpa device
+ *				@idx: virtqueue index
+ *				Returns pointer to structure device or error (NULL)
  * @free:			Free resources that belongs to vDPA (optional)
  *				@vdev: vdpa device
  */
@@ -341,6 +346,7 @@ struct vdpa_config_ops {
 			 u64 iova, u64 size);
 	int (*set_group_asid)(struct vdpa_device *vdev, unsigned int group,
 			      unsigned int asid);
+	struct device *(*get_vq_dma_dev)(struct vdpa_device *vdev, u16 idx);
 
 	/* Free device resources */
 	void (*free)(struct vdpa_device *vdev);
-- 
2.25.1

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

  parent reply	other threads:[~2023-01-11  6:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-11  6:28 [PATCH 0/5] virtio_ring: per virtqueue DMA device Jason Wang
2023-01-11  6:28 ` [PATCH 1/5] virtio_ring: per virtqueue dma device Jason Wang
     [not found]   ` <DM8PR12MB5400E61C7E968AC7604556EBABFC9@DM8PR12MB5400.namprd12.prod.outlook.com>
2023-01-11 13:52     ` Michael S. Tsirkin
     [not found]       ` <DM8PR12MB54008B92885A8971C4CFED0EABFC9@DM8PR12MB5400.namprd12.prod.outlook.com>
2023-01-11 14:54         ` Michael S. Tsirkin
     [not found]           ` <DM8PR12MB54005A89EB05BF46AD7D2DFEABFC9@DM8PR12MB5400.namprd12.prod.outlook.com>
2023-01-11 16:26             ` Michael S. Tsirkin
2023-01-11  6:28 ` Jason Wang [this message]
2023-01-11  6:28 ` [PATCH 3/5] virtio-vdpa: support per vq " Jason Wang
2023-01-11  6:28 ` [PATCH 4/5] vdpa: set dma mask for vDPA device Jason Wang
2023-01-11  6:28 ` [PATCH 5/5] vdpa: mlx5: support per virtqueue dma device Jason Wang
2023-01-11 12:38   ` kernel test robot
2023-01-12  2:07   ` kernel test robot
     [not found]   ` <DM8PR12MB5400D84460E084D3459B49B1ABC09@DM8PR12MB5400.namprd12.prod.outlook.com>
2023-01-16  2:49     ` Jason Wang
     [not found] ` <DM8PR12MB540054712BACEF34E065C2BBABFC9@DM8PR12MB5400.namprd12.prod.outlook.com>
2023-01-12  4:03   ` [PATCH 0/5] virtio_ring: per virtqueue DMA device 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=20230111062809.25020-3-jasowang@redhat.com \
    --to=jasowang@redhat.com \
    --cc=elic@nvidia.com \
    --cc=gdawar@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=tanuj.kamde@amd.com \
    --cc=virtualization@lists.linux-foundation.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).