[vfio-users] [PATCH] vfio-mdev: send KOBJ_CHANGE event after creating mdev sysfs files

Alex Williamson alex.williamson at redhat.com
Thu Feb 1 14:32:40 UTC 2018


On Thu, 1 Feb 2018 17:29:28 +0800
Wu Zongyong <cordius.wu at huawei.com> wrote:

> Like SR-IOV, driver should notify that sysfs files like some attrs or
> symbol links after cretation finished.
> 
> Signed-off-by: Wu Zongyong <cordius.wu at huawei.com>
> ---

This is the users list, per the MAINTAINERS file in the kernel, patches
are to be sent to kvm at vger.kernel.org, preferably with explicit
maintainer CCs.  There are scripts in the source tree to help with this:

$ ./scripts/get_maintainer.pl -f drivers/vfio/mdev/mdev_core.c 
Kirti Wankhede <kwankhede at nvidia.com> (maintainer:VFIO MEDIATED DEVICE DRIVERS)
Alex Williamson <alex.williamson at redhat.com> (maintainer:VFIO DRIVER)
kvm at vger.kernel.org (open list:VFIO MEDIATED DEVICE DRIVERS)
linux-kernel at vger.kernel.org (open list)

Note the whitespace in the patch below is incorrect, spaces rather
than tabs, ./scripts/checkpatch.pl can help with these sorts of trivial
errors.  Please correct and resend to the appropriate lists.  Thanks,

Alex

>  drivers/vfio/mdev/mdev_core.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c
> index 1269910..a23f1d7 100644
> --- a/drivers/vfio/mdev/mdev_core.c
> +++ b/drivers/vfio/mdev/mdev_core.c
> @@ -351,6 +351,8 @@ int mdev_device_create(struct kobject *kobj, struct device *dev, uuid_le uuid)
>  		goto create_failed;
>  	}
>  
> +        kobject_uevent(&(mdev->dev.kobj), KOBJ_CHANGE);
> +
>  	mdev->type_kobj = kobj;
>  	dev_dbg(&mdev->dev, "MDEV: created\n");
>  




More information about the vfio-users mailing list