Re: [PATCH 1/6] mdev: class id support
From: Jason Wang
Date: Tue Sep 24 2019 - 07:23:45 EST
On 2019/9/24 äå5:02, Parav Pandit wrote:
> Hi Jason,
>
>
>> -----Original Message-----
>> From: Jason Wang <jasowang@xxxxxxxxxx>
>> Sent: Monday, September 23, 2019 8:03 AM
>> To: kvm@xxxxxxxxxxxxxxx; linux-s390@xxxxxxxxxxxxxxx; linux-
>> kernel@xxxxxxxxxxxxxxx; dri-devel@xxxxxxxxxxxxxxxxxxxxx; intel-
>> gfx@xxxxxxxxxxxxxxxxxxxxx; intel-gvt-dev@xxxxxxxxxxxxxxxxxxxxx;
>> kwankhede@xxxxxxxxxx; alex.williamson@xxxxxxxxxx; mst@xxxxxxxxxx;
>> tiwei.bie@xxxxxxxxx
>> Cc: virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx; netdev@xxxxxxxxxxxxxxx;
>> cohuck@xxxxxxxxxx; maxime.coquelin@xxxxxxxxxx;
>> cunming.liang@xxxxxxxxx; zhihong.wang@xxxxxxxxx;
>> rob.miller@xxxxxxxxxxxx; xiao.w.wang@xxxxxxxxx;
>> haotian.wang@xxxxxxxxxx; zhenyuw@xxxxxxxxxxxxxxx; zhi.a.wang@xxxxxxxxx;
>> jani.nikula@xxxxxxxxxxxxxxx; joonas.lahtinen@xxxxxxxxxxxxxxx;
>> rodrigo.vivi@xxxxxxxxx; airlied@xxxxxxxx; daniel@xxxxxxxx;
>> farman@xxxxxxxxxxxxx; pasic@xxxxxxxxxxxxx; sebott@xxxxxxxxxxxxx;
>> oberpar@xxxxxxxxxxxxx; heiko.carstens@xxxxxxxxxx; gor@xxxxxxxxxxxxx;
>> borntraeger@xxxxxxxxxx; akrowiak@xxxxxxxxxxxxx; freude@xxxxxxxxxxxxx;
>> lingshan.zhu@xxxxxxxxx; Ido Shamay <idos@xxxxxxxxxxxx>;
>> eperezma@xxxxxxxxxx; lulu@xxxxxxxxxx; Parav Pandit
>> <parav@xxxxxxxxxxxx>; Jason Wang <jasowang@xxxxxxxxxx>
>> Subject: [PATCH 1/6] mdev: class id support
>>
>> 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, one example is
>> virtio-mdev[1] driver. This means we need to add device class id support in bus
>> match method to pair the mdev device and mdev driver correctly.
>>
>> So this patch adds id_table to mdev_driver and class_id for mdev parent with
>> the match method for mdev bus.
>>
>> Signed-off-by: Jason Wang <jasowang@xxxxxxxxxx>
>> ---
>> Documentation/driver-api/vfio-mediated-device.rst | 7 +++++--
>> drivers/gpu/drm/i915/gvt/kvmgt.c | 2 +-
>> drivers/s390/cio/vfio_ccw_ops.c | 2 +-
>> drivers/s390/crypto/vfio_ap_ops.c | 3 ++-
>> drivers/vfio/mdev/mdev_core.c | 14 ++++++++++++--
>> drivers/vfio/mdev/mdev_driver.c | 14 ++++++++++++++
>> drivers/vfio/mdev/mdev_private.h | 1 +
>> drivers/vfio/mdev/vfio_mdev.c | 6 ++++++
>> include/linux/mdev.h | 7 ++++++-
>> include/linux/mod_devicetable.h | 8 ++++++++
>> samples/vfio-mdev/mbochs.c | 2 +-
>> samples/vfio-mdev/mdpy.c | 2 +-
>> samples/vfio-mdev/mtty.c | 2 +-
>> 13 files changed, 59 insertions(+), 11 deletions(-)
>>
> You additionally need modpost support for id table integration to modifo, modprobe and other tools.
> A small patch similar to this one [1] is needed.
> Please include in the series.
>
> [1] https://lore.kernel.org/patchwork/patch/1046991/
My understanding is this could be done on top and may require uevent
support for the bus. I can try to implement this in V2.
Thanks
>
>