[PATCH V3 2/7] mdev: bus uevent support
Parav Pandit
parav at mellanox.com
Wed Oct 16 05:06:34 UTC 2019
> -----Original Message-----
> From: Jason Wang <jasowang at redhat.com>
> Sent: Friday, October 11, 2019 3:16 AM
> To: kvm at vger.kernel.org; linux-s390 at vger.kernel.org; linux-
> kernel at vger.kernel.org; dri-devel at lists.freedesktop.org; intel-
> gfx at lists.freedesktop.org; intel-gvt-dev at lists.freedesktop.org;
> kwankhede at nvidia.com; alex.williamson at redhat.com; mst at redhat.com;
> tiwei.bie at intel.com
> Cc: virtualization at lists.linux-foundation.org; netdev at vger.kernel.org;
> cohuck at redhat.com; maxime.coquelin at redhat.com;
> cunming.liang at intel.com; zhihong.wang at intel.com;
> rob.miller at broadcom.com; xiao.w.wang at intel.com;
> haotian.wang at sifive.com; zhenyuw at linux.intel.com; zhi.a.wang at intel.com;
> jani.nikula at linux.intel.com; joonas.lahtinen at linux.intel.com;
> rodrigo.vivi at intel.com; airlied at linux.ie; daniel at ffwll.ch;
> farman at linux.ibm.com; pasic at linux.ibm.com; sebott at linux.ibm.com;
> oberpar at linux.ibm.com; heiko.carstens at de.ibm.com; gor at linux.ibm.com;
> borntraeger at de.ibm.com; akrowiak at linux.ibm.com; freude at linux.ibm.com;
> lingshan.zhu at intel.com; Ido Shamay <idos at mellanox.com>;
> eperezma at redhat.com; lulu at redhat.com; Parav Pandit
> <parav at mellanox.com>; christophe.de.dinechin at gmail.com;
> kevin.tian at intel.com; Jason Wang <jasowang at redhat.com>
> Subject: [PATCH V3 2/7] mdev: bus uevent support
>
> This patch adds bus uevent support for mdev bus in order to allow
> cooperation with userspace.
>
> Signed-off-by: Jason Wang <jasowang at redhat.com>
> ---
> drivers/vfio/mdev/mdev_driver.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/vfio/mdev/mdev_driver.c
> b/drivers/vfio/mdev/mdev_driver.c index b7c40ce86ee3..319d886ffaf7
> 100644
> --- a/drivers/vfio/mdev/mdev_driver.c
> +++ b/drivers/vfio/mdev/mdev_driver.c
> @@ -82,9 +82,17 @@ static int mdev_match(struct device *dev, struct
> device_driver *drv)
> return 0;
> }
>
> +static int mdev_uevent(struct device *dev, struct kobj_uevent_env *env)
> +{
> + struct mdev_device *mdev = to_mdev_device(dev);
> +
> + return add_uevent_var(env, "MODALIAS=mdev:c%02X", mdev-
> >class_id); }
> +
> struct bus_type mdev_bus_type = {
> .name = "mdev",
> .match = mdev_match,
> + .uevent = mdev_uevent,
> .probe = mdev_probe,
> .remove = mdev_remove,
> };
> --
> 2.19.1
Reviewed-by: Parav Pandit <parav at mellanox.com>
More information about the dri-devel
mailing list