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

Jason Wang jasowang at redhat.com
Tue Nov 19 14:07:18 UTC 2019


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.  Please work together with
>>> the Intel developers to solve this in a unified way, as you both
>>> need/want the same thing here.
>> Sure, some functions looks similar, but the "virtual" bus does not contain a
>> management interface and it's not clear that how it can be used by userspace
>> driver. For this series, sysfs/GUID based management interface is reused and
>> we had a concrete example of how it would be used by userspace driver[1] and
>> a real hardware driver implementation[2].
> The lifecycle stuff should be re-used through a library of this guid
> stuff, not by 'subclassing' mdev_device
>
> Jason


But mdev provides more than lifecycle management: type management, IOMMU 
support etc. And more could be added in the future.

Having a library that serves exactly for the case of mdev seems less 
convenient than making mdev_device a 'parent class'.

Thanks



More information about the dri-devel mailing list