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

2019-11-19 Thread Jason Wang
On 2019/11/19 下午8:40, Jason Gunthorpe wrote: On Tue, Nov 19, 2019 at 11:03:39AM +0800, Jason Wang wrote: Also, see the other conversations we are having about a "virtual" bus and devices. I do not want to have two different ways of doing the same thing in the kernel at the same time please. P

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

2019-11-18 Thread Jason Wang
On 2019/11/18 下午11:45, Cornelia Huck wrote: On Mon, 18 Nov 2019 18:59:23 +0800 Jason Wang wrote: [Note: I have not looked into the reworked architecture of this *at all* so far; just something that I noted...] This sample driver creates mdev device that simulate virtio net device over virtio

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

2019-11-18 Thread Jason Wang
On 2019/11/18 下午11:17, Greg KH wrote: On Mon, Nov 18, 2019 at 06:59:23PM +0800, Jason Wang wrote: +static void mvnet_device_release(struct device *dev) +{ + dev_dbg(dev, "mvnet: released\n"); +} We used to have documentation in the kernel source tree that said that whenever anyone did th

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

2019-11-18 Thread Cornelia Huck
On Mon, 18 Nov 2019 18:59:23 +0800 Jason Wang wrote: [Note: I have not looked into the reworked architecture of this *at all* so far; just something that I noted...] > This sample driver creates mdev device that simulate virtio net device > over virtio mdev transport. The device is implemented t

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

2019-11-18 Thread Greg KH
On Mon, Nov 18, 2019 at 06:59:23PM +0800, Jason Wang wrote: > +static void mvnet_device_release(struct device *dev) > +{ > + dev_dbg(dev, "mvnet: released\n"); > +} We used to have documentation in the kernel source tree that said that whenever anyone did this, I got to make fun of them. Unfo

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

2019-11-18 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 'v