From: Jason Gunthorpe <jgg@mellanox•com>
To: Jason Wang <jasowang@redhat•com>
Cc: "mst@redhat•com" <mst@redhat•com>,
"linux-kernel@vger•kernel.org" <linux-kernel@vger•kernel.org>,
"kvm@vger•kernel.org" <kvm@vger•kernel.org>,
"virtualization@lists•linux-foundation.org"
<virtualization@lists•linux-foundation.org>,
"netdev@vger•kernel.org" <netdev@vger•kernel.org>,
"tiwei.bie@intel•com" <tiwei.bie@intel•com>,
"maxime.coquelin@redhat•com" <maxime.coquelin@redhat•com>,
"cunming.liang@intel•com" <cunming.liang@intel•com>,
"zhihong.wang@intel•com" <zhihong.wang@intel•com>,
"rob.miller@broadcom•com" <rob.miller@broadcom•com>,
"xiao.w.wang@intel•com" <xiao.w.wang@intel•com>,
"haotian.wang@sifive•com" <haotian.wang@sifive•com>,
"lingshan.zhu@intel•com" <lingshan.zhu@intel•com>,
"eperezma@redhat•com" <eperezma@redhat•com>,
"lulu@redhat•com" <lulu@redhat•com>,
Parav Pandit <parav@mellanox•com>,
"kevin.tian@intel•com" <kevin.tian@intel•com>,
"stefanha@redhat•com" <stefanha@redhat•com>,
"rdunlap@infradead•org" <rdunlap@infradead•org>,
"hch@infradead•org" <hch@infradead•org>,
"aadam@redhat•com" <aadam@redhat•com>,
Jiri Pirko <jiri@mellanox•com>,
Shahaf Shuler <shahafs@mellanox•com>,
"hanand@xilinx•com" <hanand@xilinx•com>,
"mhabets@solarflare•com" <mhabets@solarflare•com>
Subject: Re: [PATCH V4 3/5] vDPA: introduce vDPA bus
Date: Thu, 20 Feb 2020 15:14:16 +0000 [thread overview]
Message-ID: <20200220151412.GV23930@mellanox.com> (raw)
In-Reply-To: <20200220061141.29390-4-jasowang@redhat.com>
On Thu, Feb 20, 2020 at 02:11:39PM +0800, Jason Wang wrote:
> vDPA device is a device that uses a datapath which complies with the
> virtio specifications with vendor specific control path. vDPA devices
> can be both physically located on the hardware or emulated by
> software. vDPA hardware devices are usually implemented through PCIE
> with the following types:
>
> - PF (Physical Function) - A single Physical Function
> - VF (Virtual Function) - Device that supports single root I/O
> virtualization (SR-IOV). Its Virtual Function (VF) represents a
> virtualized instance of the device that can be assigned to different
> partitions
> - ADI (Assignable Device Interface) and its equivalents - With
> technologies such as Intel Scalable IOV, a virtual device (VDEV)
> composed by host OS utilizing one or more ADIs. Or its equivalent
> like SF (Sub function) from Mellanox.
>
> From a driver's perspective, depends on how and where the DMA
> translation is done, vDPA devices are split into two types:
>
> - Platform specific DMA translation - From the driver's perspective,
> the device can be used on a platform where device access to data in
> memory is limited and/or translated. An example is a PCIE vDPA whose
> DMA request was tagged via a bus (e.g PCIE) specific way. DMA
> translation and protection are done at PCIE bus IOMMU level.
> - Device specific DMA translation - The device implements DMA
> isolation and protection through its own logic. An example is a vDPA
> device which uses on-chip IOMMU.
>
> To hide the differences and complexity of the above types for a vDPA
> device/IOMMU options and in order to present a generic virtio device
> to the upper layer, a device agnostic framework is required.
>
> This patch introduces a software vDPA bus which abstracts the
> common attributes of vDPA device, vDPA bus driver and the
> communication method (vdpa_config_ops) between the vDPA device
> abstraction and the vDPA bus driver. This allows multiple types of
> drivers to be used for vDPA device like the virtio_vdpa and vhost_vdpa
> driver to operate on the bus and allow vDPA device could be used by
> either kernel virtio driver or userspace vhost drivers as:
>
> virtio drivers vhost drivers
> | |
> [virtio bus] [vhost uAPI]
> | |
> virtio device vhost device
> virtio_vdpa drv vhost_vdpa drv
> \ /
> [vDPA bus]
> |
> vDPA device
> hardware drv
> |
> [hardware bus]
> |
> vDPA hardware
I still don't like this strange complexity, vhost should have been
layered on top of the virtio device instead of adding an extra bus
just for vdpa.
However, I don't see any technical problems with this patch now.
Thanks,
Jason
next prev parent reply other threads:[~2020-02-20 15:14 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-20 6:11 [PATCH V4 0/5] vDPA support Jason Wang
2020-02-20 6:11 ` [PATCH V4 1/5] vhost: factor out IOTLB Jason Wang
2020-02-20 6:11 ` [PATCH V4 2/5] vringh: IOTLB support Jason Wang
2020-02-20 6:11 ` [PATCH V4 3/5] vDPA: introduce vDPA bus Jason Wang
2020-02-20 15:14 ` Jason Gunthorpe [this message]
2020-02-21 7:54 ` Jason Wang
2020-02-24 6:14 ` Harpreet Singh Anand
2020-02-24 6:48 ` Jason Wang
2020-02-20 6:11 ` [PATCH V4 4/5] virtio: introduce a vDPA based transport Jason Wang
2020-02-20 15:19 ` Jason Gunthorpe
2020-02-21 8:06 ` Jason Wang
2020-02-20 6:11 ` [PATCH V4 5/5] vdpasim: vDPA device simulator Jason Wang
2020-02-20 15:12 ` Jason Gunthorpe
2020-02-21 7:57 ` Jason Wang
2020-02-26 6:12 ` Jason Wang
2020-02-26 17:19 ` Jason Gunthorpe
2020-02-21 8:33 ` Harpreet Singh Anand
2020-02-21 8:50 ` 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=20200220151412.GV23930@mellanox.com \
--to=jgg@mellanox$(echo .)com \
--cc=aadam@redhat$(echo .)com \
--cc=cunming.liang@intel$(echo .)com \
--cc=eperezma@redhat$(echo .)com \
--cc=hanand@xilinx$(echo .)com \
--cc=haotian.wang@sifive$(echo .)com \
--cc=hch@infradead$(echo .)org \
--cc=jasowang@redhat$(echo .)com \
--cc=jiri@mellanox$(echo .)com \
--cc=kevin.tian@intel$(echo .)com \
--cc=kvm@vger$(echo .)kernel.org \
--cc=lingshan.zhu@intel$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=lulu@redhat$(echo .)com \
--cc=maxime.coquelin@redhat$(echo .)com \
--cc=mhabets@solarflare$(echo .)com \
--cc=mst@redhat$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=parav@mellanox$(echo .)com \
--cc=rdunlap@infradead$(echo .)org \
--cc=rob.miller@broadcom$(echo .)com \
--cc=shahafs@mellanox$(echo .)com \
--cc=stefanha@redhat$(echo .)com \
--cc=tiwei.bie@intel$(echo .)com \
--cc=virtualization@lists$(echo .)linux-foundation.org \
--cc=xiao.w.wang@intel$(echo .)com \
--cc=zhihong.wang@intel$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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