search for: vfio_vhost_mdev_release

Displaying 11 results from an estimated 11 matches for "vfio_vhost_mdev_release".

2019 Sep 19
3
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...vfio_device_ops for VFIO to make container DMA ioctl work. I see. Thanks! IIUC, you mean we can provide a very tiny VFIO device driver in drivers/vhost/mdev.c, e.g.: static int vfio_vhost_mdev_open(void *device_data) { if (!try_module_get(THIS_MODULE)) return -ENODEV; return 0; } static void vfio_vhost_mdev_release(void *device_data) { module_put(THIS_MODULE); } static const struct vfio_device_ops vfio_vhost_mdev_dev_ops = { .name = "vfio-vhost-mdev", .open = vfio_vhost_mdev_open, .release = vfio_vhost_mdev_release, }; static int vhost_mdev_probe(struct device *dev) { struct mdev_device *md...
2019 Sep 19
3
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...vfio_device_ops for VFIO to make container DMA ioctl work. I see. Thanks! IIUC, you mean we can provide a very tiny VFIO device driver in drivers/vhost/mdev.c, e.g.: static int vfio_vhost_mdev_open(void *device_data) { if (!try_module_get(THIS_MODULE)) return -ENODEV; return 0; } static void vfio_vhost_mdev_release(void *device_data) { module_put(THIS_MODULE); } static const struct vfio_device_ops vfio_vhost_mdev_dev_ops = { .name = "vfio-vhost-mdev", .open = vfio_vhost_mdev_open, .release = vfio_vhost_mdev_release, }; static int vhost_mdev_probe(struct device *dev) { struct mdev_device *md...
2019 Sep 20
1
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...vide a very tiny > > VFIO device driver in drivers/vhost/mdev.c, e.g.: > > > > static int vfio_vhost_mdev_open(void *device_data) > > { > > if (!try_module_get(THIS_MODULE)) > > return -ENODEV; > > return 0; > > } > > > > static void vfio_vhost_mdev_release(void *device_data) > > { > > module_put(THIS_MODULE); > > } > > > > static const struct vfio_device_ops vfio_vhost_mdev_dev_ops = { > > .name = "vfio-vhost-mdev", > > .open = vfio_vhost_mdev_open, > > .release = vfio_vhost_mdev_releas...
2019 Sep 17
2
[RFC v4 0/3] vhost: introduce mdev based hardware backend
..."mdev_private.h" /* XXX: we need a proper way to include below vhost header. */ #include "../../vhost/vhost.h" static int vfio_vhost_mdev_open(void *device_data) { if (!try_module_get(THIS_MODULE)) return -ENODEV; /* ... */ vhost_dev_init(...); return 0; } static void vfio_vhost_mdev_release(void *device_data) { /* ... */ module_put(THIS_MODULE); } static long vfio_vhost_mdev_unlocked_ioctl(void *device_data, unsigned int cmd, unsigned long arg) { struct mdev_device *mdev = device_data; struct mdev_parent *parent = mdev->parent; /* * Use vhost ioctls. * * We wil...
2019 Sep 17
2
[RFC v4 0/3] vhost: introduce mdev based hardware backend
..."mdev_private.h" /* XXX: we need a proper way to include below vhost header. */ #include "../../vhost/vhost.h" static int vfio_vhost_mdev_open(void *device_data) { if (!try_module_get(THIS_MODULE)) return -ENODEV; /* ... */ vhost_dev_init(...); return 0; } static void vfio_vhost_mdev_release(void *device_data) { /* ... */ module_put(THIS_MODULE); } static long vfio_vhost_mdev_unlocked_ioctl(void *device_data, unsigned int cmd, unsigned long arg) { struct mdev_device *mdev = device_data; struct mdev_parent *parent = mdev->parent; /* * Use vhost ioctls. * * We wil...
2019 Sep 18
2
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...; > > > > static int vfio_vhost_mdev_open(void *device_data) > > { > > if (!try_module_get(THIS_MODULE)) > > return -ENODEV; > > > > /* ... */ > > vhost_dev_init(...); > > > > return 0; > > } > > > > static void vfio_vhost_mdev_release(void *device_data) > > { > > /* ... */ > > module_put(THIS_MODULE); > > } > > > > static long vfio_vhost_mdev_unlocked_ioctl(void *device_data, > > unsigned int cmd, unsigned long arg) > > { > > struct mdev_device *mdev = device_data...
2019 Sep 18
2
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...; > > > > static int vfio_vhost_mdev_open(void *device_data) > > { > > if (!try_module_get(THIS_MODULE)) > > return -ENODEV; > > > > /* ... */ > > vhost_dev_init(...); > > > > return 0; > > } > > > > static void vfio_vhost_mdev_release(void *device_data) > > { > > /* ... */ > > module_put(THIS_MODULE); > > } > > > > static long vfio_vhost_mdev_unlocked_ioctl(void *device_data, > > unsigned int cmd, unsigned long arg) > > { > > struct mdev_device *mdev = device_data...
2019 Sep 20
0
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...work. > I see. Thanks! IIUC, you mean we can provide a very tiny > VFIO device driver in drivers/vhost/mdev.c, e.g.: > > static int vfio_vhost_mdev_open(void *device_data) > { > if (!try_module_get(THIS_MODULE)) > return -ENODEV; > return 0; > } > > static void vfio_vhost_mdev_release(void *device_data) > { > module_put(THIS_MODULE); > } > > static const struct vfio_device_ops vfio_vhost_mdev_dev_ops = { > .name = "vfio-vhost-mdev", > .open = vfio_vhost_mdev_open, > .release = vfio_vhost_mdev_release, > }; > > static int vhost_mde...
2019 Sep 18
0
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...e below vhost header. */ > #include "../../vhost/vhost.h" > > static int vfio_vhost_mdev_open(void *device_data) > { > if (!try_module_get(THIS_MODULE)) > return -ENODEV; > > /* ... */ > vhost_dev_init(...); > > return 0; > } > > static void vfio_vhost_mdev_release(void *device_data) > { > /* ... */ > module_put(THIS_MODULE); > } > > static long vfio_vhost_mdev_unlocked_ioctl(void *device_data, > unsigned int cmd, unsigned long arg) > { > struct mdev_device *mdev = device_data; > struct mdev_parent *parent = mdev->...
2019 Sep 17
7
[RFC v4 0/3] vhost: introduce mdev based hardware backend
This RFC is to demonstrate below ideas, a) Build vhost-mdev on top of the same abstraction defined in the virtio-mdev series [1]; b) Introduce /dev/vhost-mdev to do vhost ioctls and support setting mdev device as backend; Now the userspace API looks like this: - Userspace generates a compatible mdev device; - Userspace opens this mdev device with VFIO API (including doing IOMMU
2019 Sep 17
7
[RFC v4 0/3] vhost: introduce mdev based hardware backend
This RFC is to demonstrate below ideas, a) Build vhost-mdev on top of the same abstraction defined in the virtio-mdev series [1]; b) Introduce /dev/vhost-mdev to do vhost ioctls and support setting mdev device as backend; Now the userspace API looks like this: - Userspace generates a compatible mdev device; - Userspace opens this mdev device with VFIO API (including doing IOMMU