Re: [PATCH V7 3/6] mdev: introduce device specific ops

2019-11-04 Thread Alex Williamson
On Mon, 4 Nov 2019 20:39:49 +0800 Jason Wang wrote: > Currently, except for the create and remove, the rest of > mdev_parent_ops is designed for vfio-mdev driver only and may not help > for kernel mdev driver. With the help of class id, this patch > introduces device specific callbacks inside

Re: [PATCH V7 4/6] mdev: introduce virtio device and its device ops

2019-11-04 Thread Alex Williamson
On Mon, 4 Nov 2019 20:39:50 +0800 Jason Wang wrote: > This patch implements basic support for mdev driver that supports > virtio transport for kernel virtio driver. > > Signed-off-by: Jason Wang > --- > drivers/vfio/mdev/mdev_core.c| 20 > drivers/vfio/mdev/mdev_private.h | 2 + >

Re: [PATCH V7 1/6] mdev: class id support

2019-11-04 Thread Alex Williamson
On Mon, 4 Nov 2019 20:39:47 +0800 Jason Wang wrote: > Mdev bus only supports vfio driver right now, so it doesn't implement > match method. But in the future, we may add drivers other than vfio, > the first driver could be virtio-mdev. This means we need to add > device class id support in bus

Re: [PATCH V7 1/6] mdev: class id support

2019-11-04 Thread Jason Wang
On 2019/11/5 上午5:50, Alex Williamson wrote: On Mon, 4 Nov 2019 20:39:47 +0800 Jason Wang wrote: Mdev bus only supports vfio driver right now, so it doesn't implement match method. But in the future, we may add drivers other than vfio, the first driver could be virtio-mdev. This means we

Re: [PATCH V7 4/6] mdev: introduce virtio device and its device ops

2019-11-04 Thread Alex Williamson
On Tue, 5 Nov 2019 11:52:41 +0800 Jason Wang wrote: > On 2019/11/5 上午5:50, Alex Williamson wrote: > > On Mon, 4 Nov 2019 20:39:50 +0800 > > Jason Wang wrote: > > > >> This patch implements basic support for mdev driver that supports > >> virtio transport for kernel virtio driver. > >> > >>

Re: [PATCH V7 3/6] mdev: introduce device specific ops

2019-11-04 Thread Jason Wang
On 2019/11/5 上午5:50, Alex Williamson wrote: EXPORT_SYMBOL(mdev_set_drvdata); + Extra whitespace /* Specify the class for the mdev device, this must be called during - * create() callback. - */ + * create() callback explicitly or implicity through the helpers s/implicity/implicitly/

Re: [PATCH V7 4/6] mdev: introduce virtio device and its device ops

2019-11-04 Thread Jason Wang
On 2019/11/5 上午5:50, Alex Williamson wrote: On Mon, 4 Nov 2019 20:39:50 +0800 Jason Wang wrote: This patch implements basic support for mdev driver that supports virtio transport for kernel virtio driver. Signed-off-by: Jason Wang --- drivers/vfio/mdev/mdev_core.c| 20

Re: [PATCH V7 4/6] mdev: introduce virtio device and its device ops

2019-11-04 Thread Jason Wang
On 2019/11/5 下午12:39, Alex Williamson wrote: On Tue, 5 Nov 2019 11:52:41 +0800 Jason Wang wrote: On 2019/11/5 上午5:50, Alex Williamson wrote: On Mon, 4 Nov 2019 20:39:50 +0800 Jason Wang wrote: This patch implements basic support for mdev driver that supports virtio transport for

[PATCH V7 0/6] mdev based hardware virtio offloading support

2019-11-04 Thread Jason Wang
Hi all: There are hardwares that can do virtio datapath offloading while having its own control path. This path tries to implement a mdev based unified API to support using kernel virtio driver to drive those devices. This is done by introducing a new mdev transport for virtio (virtio_mdev) and

[PATCH V7 2/6] modpost: add support for mdev class id

2019-11-04 Thread Jason Wang
Add support to parse mdev class id table. Reviewed-by: Parav Pandit Signed-off-by: Jason Wang --- drivers/vfio/mdev/vfio_mdev.c | 2 ++ scripts/mod/devicetable-offsets.c | 3 +++ scripts/mod/file2alias.c | 11 +++ 3 files changed, 16 insertions(+) diff --git

[PATCH V7 3/6] mdev: introduce device specific ops

2019-11-04 Thread Jason Wang
Currently, except for the create and remove, the rest of mdev_parent_ops is designed for vfio-mdev driver only and may not help for kernel mdev driver. With the help of class id, this patch introduces device specific callbacks inside mdev_device structure. This allows different set of callback to

[PATCH V7 4/6] mdev: introduce virtio device and its device ops

2019-11-04 Thread Jason Wang
This patch implements basic support for mdev driver that supports virtio transport for kernel virtio driver. Signed-off-by: Jason Wang --- drivers/vfio/mdev/mdev_core.c| 20 drivers/vfio/mdev/mdev_private.h | 2 + include/linux/mdev.h | 6 ++

[PATCH V7 5/6] virtio: introduce a mdev based transport

2019-11-04 Thread Jason Wang
This patch introduces a new mdev transport for virtio. This is used to use kernel virtio driver to drive the mediated device that is capable of populating virtqueue directly. A new virtio-mdev driver will be registered to the mdev bus, when a new virtio-mdev device is probed, it will register the

[PATCH V7 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework

2019-11-04 Thread Jason Wang
This sample driver creates mdev device that simulate virtio net device over virtio mdev transport. The device is implemented through vringh and workqueue. A device specific dma ops is to make sure HVA is used directly as the IOVA. This should be sufficient for kernel virtio driver to work. Only

Re: [PATCH net-next 12/14] vsock/vmci: register vmci_transport only when VMCI guest/host are active

2019-11-04 Thread Stefano Garzarella
Hi Jorgen, I'm preparing the v2, but first, if you have time, I'd like to have a comment from you on this patch that modifies a bit vmci. Thank you very much, Stefano On Wed, Oct 23, 2019 at 11:55:52AM +0200, Stefano Garzarella wrote: > To allow other transports to be loaded with vmci_transport,