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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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..64cc808 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");
 
-- 
1.9.1




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux