Hi Jason,
> -----Original Message----- > From: Jason Wang <jasow...@redhat.com> > Sent: Monday, September 23, 2019 8:03 AM > To: k...@vger.kernel.org; linux-s...@vger.kernel.org; linux- > ker...@vger.kernel.org; dri-devel@lists.freedesktop.org; intel- > g...@lists.freedesktop.org; intel-gvt-...@lists.freedesktop.org; > kwankh...@nvidia.com; alex.william...@redhat.com; m...@redhat.com; > tiwei....@intel.com > Cc: virtualizat...@lists.linux-foundation.org; net...@vger.kernel.org; > coh...@redhat.com; maxime.coque...@redhat.com; > cunming.li...@intel.com; zhihong.w...@intel.com; > rob.mil...@broadcom.com; xiao.w.w...@intel.com; > haotian.w...@sifive.com; zhen...@linux.intel.com; zhi.a.w...@intel.com; > jani.nik...@linux.intel.com; joonas.lahti...@linux.intel.com; > rodrigo.v...@intel.com; airl...@linux.ie; dan...@ffwll.ch; > far...@linux.ibm.com; pa...@linux.ibm.com; seb...@linux.ibm.com; > ober...@linux.ibm.com; heiko.carst...@de.ibm.com; g...@linux.ibm.com; > borntrae...@de.ibm.com; akrow...@linux.ibm.com; fre...@linux.ibm.com; > lingshan....@intel.com; Ido Shamay <i...@mellanox.com>; > epere...@redhat.com; l...@redhat.com; Parav Pandit > <pa...@mellanox.com>; Jason Wang <jasow...@redhat.com> > 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 <jasow...@redhat.com> > --- > 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/