On 2019/9/24 上午5:02, Parav Pandit wrote: > Hi Jason, > > >> -----Original Message----- >> From: Jason Wang <[email protected]> >> Sent: Monday, September 23, 2019 8:03 AM >> To: [email protected]; [email protected]; linux- >> [email protected]; [email protected]; intel- >> [email protected]; [email protected]; >> [email protected]; [email protected]; [email protected]; >> [email protected] >> Cc: [email protected]; [email protected]; >> [email protected]; [email protected]; >> [email protected]; [email protected]; >> [email protected]; [email protected]; >> [email protected]; [email protected]; [email protected]; >> [email protected]; [email protected]; >> [email protected]; [email protected]; [email protected]; >> [email protected]; [email protected]; [email protected]; >> [email protected]; [email protected]; [email protected]; >> [email protected]; [email protected]; [email protected]; >> [email protected]; Ido Shamay <[email protected]>; >> [email protected]; [email protected]; Parav Pandit >> <[email protected]>; Jason Wang <[email protected]> >> 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 <[email protected]> >> --- >> 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 > >

