On Tue, Nov 19, 2019 at 10:07:18PM +0800, Jason Wang wrote: > > 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 > > But mdev provides more than lifecycle management: type management, IOMMU > support etc. And more could be added in the future. iommu support comes from dma_ops, not mdev. mdev only provides vfio, and in this example there is no use of those vfio ops - so it is not mdev. > Having a library that serves exactly for the case of mdev seems less > convenient than making mdev_device a 'parent class'. It is the design pattern the device core uses Jason _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx