search for: vhost_mdev_remov

Displaying 20 results from an estimated 36 matches for "vhost_mdev_remov".

Did you mean: vhost_mdev_remove
2019 Sep 19
3
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...vhost_mdev_release, }; static int vhost_mdev_probe(struct device *dev) { struct mdev_device *mdev = to_mdev_device(dev); ... Check the mdev device_id proposed in ... ... https://lkml.org/lkml/2019/9/12/151 ... return vfio_add_group_dev(dev, &vfio_vhost_mdev_dev_ops, mdev); } static void vhost_mdev_remove(struct device *dev) { vfio_del_group_dev(dev); } static struct mdev_driver vhost_mdev_driver = { .name = "vhost_mdev", .probe = vhost_mdev_probe, .remove = vhost_mdev_remove, }; So we can bind above mdev driver to the virtio-mdev compatible mdev devices when we want to use vhost-md...
2019 Sep 19
3
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...vhost_mdev_release, }; static int vhost_mdev_probe(struct device *dev) { struct mdev_device *mdev = to_mdev_device(dev); ... Check the mdev device_id proposed in ... ... https://lkml.org/lkml/2019/9/12/151 ... return vfio_add_group_dev(dev, &vfio_vhost_mdev_dev_ops, mdev); } static void vhost_mdev_remove(struct device *dev) { vfio_del_group_dev(dev); } static struct mdev_driver vhost_mdev_driver = { .name = "vhost_mdev", .probe = vhost_mdev_probe, .remove = vhost_mdev_remove, }; So we can bind above mdev driver to the virtio-mdev compatible mdev devices when we want to use vhost-md...
2019 Sep 20
1
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...://lkml.org/lkml/2019/9/17/332 I.e. we won't have a separate vhost fd and we will do all vhost ioctls on the VFIO device fd backed by this new VFIO driver. > And it could have a dummy ops > implementation for the other device_ops. > > > > } > > > > static void vhost_mdev_remove(struct device *dev) > > { > > vfio_del_group_dev(dev); > > } > > > > static struct mdev_driver vhost_mdev_driver = { > > .name = "vhost_mdev", > > .probe = vhost_mdev_probe, > > .remove = vhost_mdev_remove, > > }; > > >...
2019 Sep 27
1
[PATCH] vhost: introduce mdev based hardware backend
..., Jason Wang wrote: > + > +static struct mdev_class_id id_table[] = { > +??? { MDEV_ID_VHOST }, > +??? { 0 }, > +}; > + > +static struct mdev_driver vhost_mdev_driver = { > +??? .name??? = "vhost_mdev", > +??? .probe??? = vhost_mdev_probe, > +??? .remove??? = vhost_mdev_remove, > +??? .id_table = id_table, > +}; > + And you probably need to add MODULE_DEVICE_TABLE() as well. Thanks
2019 Sep 20
0
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...And in vfio_vhost_mdev_ops, all its need is to just implement vhost-net ioctl and translate them to virtio-mdev transport (e.g device_ops I proposed or ioctls other whatever other method) API. And it could have a dummy ops implementation for the other device_ops. > } > > static void vhost_mdev_remove(struct device *dev) > { > vfio_del_group_dev(dev); > } > > static struct mdev_driver vhost_mdev_driver = { > .name = "vhost_mdev", > .probe = vhost_mdev_probe, > .remove = vhost_mdev_remove, > }; > > So we can bind above mdev driver to the virtio-mdev...
2019 Sep 26
6
[PATCH] vhost: introduce mdev based hardware backend
...RNEL); + if (!m->vqs) { + r = -ENOMEM; + goto err; + } + + r = vfio_add_group_dev(dev, &vfio_vhost_mdev_dev_ops, m); + if (r) + goto err; + + m->features = ops->get_features(mdev); + m->mdev = mdev; + return 0; + +err: + kfree(m->vqs); + kfree(m); + return r; +} + +static void vhost_mdev_remove(struct device *dev) +{ + struct vhost_mdev *m; + + m = vfio_del_group_dev(dev); + mutex_destroy(&m->mutex); + kfree(m->vqs); + kfree(m); +} + +static struct mdev_class_id id_table[] = { + { MDEV_ID_VHOST }, + { 0 }, +}; + +static struct mdev_driver vhost_mdev_driver = { + .name = "v...
2019 Sep 26
6
[PATCH] vhost: introduce mdev based hardware backend
...RNEL); + if (!m->vqs) { + r = -ENOMEM; + goto err; + } + + r = vfio_add_group_dev(dev, &vfio_vhost_mdev_dev_ops, m); + if (r) + goto err; + + m->features = ops->get_features(mdev); + m->mdev = mdev; + return 0; + +err: + kfree(m->vqs); + kfree(m); + return r; +} + +static void vhost_mdev_remove(struct device *dev) +{ + struct vhost_mdev *m; + + m = vfio_del_group_dev(dev); + mutex_destroy(&m->mutex); + kfree(m->vqs); + kfree(m); +} + +static struct mdev_class_id id_table[] = { + { MDEV_ID_VHOST }, + { 0 }, +}; + +static struct mdev_driver vhost_mdev_driver = { + .name = "v...
2019 Sep 26
0
[PATCH] vhost: introduce mdev based hardware backend
...io_add_group_dev(dev, &vfio_vhost_mdev_dev_ops, m); > + if (r) > + goto err; > + > + m->features = ops->get_features(mdev); > + m->mdev = mdev; > + return 0; > + > +err: > + kfree(m->vqs); > + kfree(m); > + return r; > +} > + > +static void vhost_mdev_remove(struct device *dev) > +{ > + struct vhost_mdev *m; > + > + m = vfio_del_group_dev(dev); > + mutex_destroy(&m->mutex); > + kfree(m->vqs); > + kfree(m); > +} > + > +static struct mdev_class_id id_table[] = { > + { MDEV_ID_VHOST }, > + { 0 }, > +}; &gt...
2019 Oct 22
2
[PATCH v2] vhost: introduce mdev based hardware backend
...ct vhost_virtqueue), + GFP_KERNEL); + if (!m->vqs) + return -ENOMEM; + + r = vfio_add_group_dev(dev, &vfio_vhost_mdev_dev_ops, m); + if (r) + return r; + + mutex_init(&m->mutex); + m->features = ops->get_features(mdev); + m->mdev = mdev; + return 0; +} + +static void vhost_mdev_remove(struct device *dev) +{ + struct vhost_mdev *m; + + m = vfio_del_group_dev(dev); + mutex_destroy(&m->mutex); +} + +static const struct mdev_class_id vhost_mdev_match[] = { + { MDEV_CLASS_ID_VHOST }, + { 0 }, +}; +MODULE_DEVICE_TABLE(mdev, vhost_mdev_match); + +static struct mdev_driver vhost...
2019 Oct 22
2
[PATCH v2] vhost: introduce mdev based hardware backend
...ct vhost_virtqueue), + GFP_KERNEL); + if (!m->vqs) + return -ENOMEM; + + r = vfio_add_group_dev(dev, &vfio_vhost_mdev_dev_ops, m); + if (r) + return r; + + mutex_init(&m->mutex); + m->features = ops->get_features(mdev); + m->mdev = mdev; + return 0; +} + +static void vhost_mdev_remove(struct device *dev) +{ + struct vhost_mdev *m; + + m = vfio_del_group_dev(dev); + mutex_destroy(&m->mutex); +} + +static const struct mdev_class_id vhost_mdev_match[] = { + { MDEV_CLASS_ID_VHOST }, + { 0 }, +}; +MODULE_DEVICE_TABLE(mdev, vhost_mdev_match); + +static struct mdev_driver vhost...
2019 Sep 18
2
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...gt; > > static int vfio_vhost_mdev_probe(struct device *dev) > > { > > struct mdev_device *mdev = to_mdev_device(dev); > > > > /* ... */ > > return vfio_add_group_dev(dev, &vfio_vhost_mdev_dev_ops, mdev); > > } > > > > static void vfio_vhost_mdev_remove(struct device *dev) > > { > > /* ... */ > > vfio_del_group_dev(dev); > > } > > > > static struct mdev_driver vfio_vhost_mdev_driver = { > > .name = "vfio_vhost_mdev", > > .probe = vfio_vhost_mdev_probe, > > .remove = vfio_vhost_...
2019 Sep 18
2
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...gt; > > static int vfio_vhost_mdev_probe(struct device *dev) > > { > > struct mdev_device *mdev = to_mdev_device(dev); > > > > /* ... */ > > return vfio_add_group_dev(dev, &vfio_vhost_mdev_dev_ops, mdev); > > } > > > > static void vfio_vhost_mdev_remove(struct device *dev) > > { > > /* ... */ > > vfio_del_group_dev(dev); > > } > > > > static struct mdev_driver vfio_vhost_mdev_driver = { > > .name = "vfio_vhost_mdev", > > .probe = vfio_vhost_mdev_probe, > > .remove = vfio_vhost_...
2019 Sep 27
0
[PATCH] vhost: introduce mdev based hardware backend
...io_add_group_dev(dev, &vfio_vhost_mdev_dev_ops, m); > + if (r) > + goto err; > + > + m->features = ops->get_features(mdev); > + m->mdev = mdev; > + return 0; > + > +err: > + kfree(m->vqs); > + kfree(m); > + return r; > +} > + > +static void vhost_mdev_remove(struct device *dev) > +{ > + struct vhost_mdev *m; > + > + m = vfio_del_group_dev(dev); > + mutex_destroy(&m->mutex); > + kfree(m->vqs); > + kfree(m); > +} > + > +static struct mdev_class_id id_table[] = { > + { MDEV_ID_VHOST }, > + { 0 }, > +}; &gt...
2019 Sep 27
5
[PATCH] vhost: introduce mdev based hardware backend
...(r) > > + goto err; > > + > > + m->features = ops->get_features(mdev); > > + m->mdev = mdev; > > + return 0; > > + > > +err: > > + kfree(m->vqs); > > + kfree(m); > > + return r; > > +} > > + > > +static void vhost_mdev_remove(struct device *dev) > > +{ > > + struct vhost_mdev *m; > > + > > + m = vfio_del_group_dev(dev); > > + mutex_destroy(&m->mutex); > > + kfree(m->vqs); > > + kfree(m); > > +} > > + > > +static struct mdev_class_id id_table[] = { &g...
2019 Sep 27
5
[PATCH] vhost: introduce mdev based hardware backend
...(r) > > + goto err; > > + > > + m->features = ops->get_features(mdev); > > + m->mdev = mdev; > > + return 0; > > + > > +err: > > + kfree(m->vqs); > > + kfree(m); > > + return r; > > +} > > + > > +static void vhost_mdev_remove(struct device *dev) > > +{ > > + struct vhost_mdev *m; > > + > > + m = vfio_del_group_dev(dev); > > + mutex_destroy(&m->mutex); > > + kfree(m->vqs); > > + kfree(m); > > +} > > + > > +static struct mdev_class_id id_table[] = { &g...
2019 Oct 29
2
[PATCH v3] vhost: introduce mdev based hardware backend
...n -ENOMEM; + + mutex_init(&m->mutex); + + m->mdev = mdev; + m->nvqs = nvqs; + m->virtio_id = ops->get_device_id(mdev); + + r = vfio_add_group_dev(dev, &vfio_vhost_mdev_dev_ops, m); + if (r) { + mutex_destroy(&m->mutex); + return r; + } + + return 0; +} + +static void vhost_mdev_remove(struct device *dev) +{ + struct vhost_mdev *m; + + m = vfio_del_group_dev(dev); + mutex_destroy(&m->mutex); +} + +static const struct mdev_class_id vhost_mdev_match[] = { + { MDEV_CLASS_ID_VHOST }, + { 0 }, +}; +MODULE_DEVICE_TABLE(mdev, vhost_mdev_match); + +static struct mdev_driver vhost...
2019 Oct 29
2
[PATCH v3] vhost: introduce mdev based hardware backend
...n -ENOMEM; + + mutex_init(&m->mutex); + + m->mdev = mdev; + m->nvqs = nvqs; + m->virtio_id = ops->get_device_id(mdev); + + r = vfio_add_group_dev(dev, &vfio_vhost_mdev_dev_ops, m); + if (r) { + mutex_destroy(&m->mutex); + return r; + } + + return 0; +} + +static void vhost_mdev_remove(struct device *dev) +{ + struct vhost_mdev *m; + + m = vfio_del_group_dev(dev); + mutex_destroy(&m->mutex); +} + +static const struct mdev_class_id vhost_mdev_match[] = { + { MDEV_CLASS_ID_VHOST }, + { 0 }, +}; +MODULE_DEVICE_TABLE(mdev, vhost_mdev_match); + +static struct mdev_driver vhost...
2019 Nov 05
4
[PATCH v5] vhost: introduce mdev based hardware backend
...n -ENOMEM; + + mutex_init(&m->mutex); + + m->mdev = mdev; + m->nvqs = nvqs; + m->virtio_id = ops->get_device_id(mdev); + + r = vfio_add_group_dev(dev, &vfio_vhost_mdev_dev_ops, m); + if (r) { + mutex_destroy(&m->mutex); + return r; + } + + return 0; +} + +static void vhost_mdev_remove(struct device *dev) +{ + struct vhost_mdev *m; + + m = vfio_del_group_dev(dev); + mutex_destroy(&m->mutex); +} + +static const struct mdev_class_id vhost_mdev_match[] = { + { MDEV_CLASS_ID_VHOST }, + { 0 }, +}; +MODULE_DEVICE_TABLE(mdev, vhost_mdev_match); + +static struct mdev_driver vhost...
2019 Nov 05
4
[PATCH v5] vhost: introduce mdev based hardware backend
...n -ENOMEM; + + mutex_init(&m->mutex); + + m->mdev = mdev; + m->nvqs = nvqs; + m->virtio_id = ops->get_device_id(mdev); + + r = vfio_add_group_dev(dev, &vfio_vhost_mdev_dev_ops, m); + if (r) { + mutex_destroy(&m->mutex); + return r; + } + + return 0; +} + +static void vhost_mdev_remove(struct device *dev) +{ + struct vhost_mdev *m; + + m = vfio_del_group_dev(dev); + mutex_destroy(&m->mutex); +} + +static const struct mdev_class_id vhost_mdev_match[] = { + { MDEV_CLASS_ID_VHOST }, + { 0 }, +}; +MODULE_DEVICE_TABLE(mdev, vhost_mdev_match); + +static struct mdev_driver vhost...
2019 Oct 22
0
[PATCH v2] vhost: introduce mdev based hardware backend
...re seems strange. > + > + r = vfio_add_group_dev(dev, &vfio_vhost_mdev_dev_ops, m); > + if (r) > + return r; > + > + mutex_init(&m->mutex); > + m->features = ops->get_features(mdev); > + m->mdev = mdev; > + return 0; > +} > + > +static void vhost_mdev_remove(struct device *dev) > +{ > + struct vhost_mdev *m; > + > + m = vfio_del_group_dev(dev); > + mutex_destroy(&m->mutex); > +} > + > +static const struct mdev_class_id vhost_mdev_match[] = { > + { MDEV_CLASS_ID_VHOST }, > + { 0 }, > +}; > +MODULE_DEVICE_TABLE...