Displaying 10 results from an estimated 10 matches for "vhost_mdev_set_backend".
2019 Sep 17
7
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...ble mdev device;
- Userspace opens this mdev device with VFIO API (including
doing IOMMU programming for this mdev device with VFIO's
container/group based interface);
- Userspace opens /dev/vhost-mdev and gets vhost fd;
- Userspace uses vhost ioctls to setup vhost (userspace should
do VHOST_MDEV_SET_BACKEND ioctl with VFIO group fd and device
fd first before doing other vhost ioctls);
Only compile test has been done for this series for now.
RFCv3: https://patchwork.kernel.org/patch/11117785/
[1] https://lkml.org/lkml/2019/9/10/135
Tiwei Bie (3):
vfio: support getting vfio device from device fd...
2019 Sep 17
7
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...ble mdev device;
- Userspace opens this mdev device with VFIO API (including
doing IOMMU programming for this mdev device with VFIO's
container/group based interface);
- Userspace opens /dev/vhost-mdev and gets vhost fd;
- Userspace uses vhost ioctls to setup vhost (userspace should
do VHOST_MDEV_SET_BACKEND ioctl with VFIO group fd and device
fd first before doing other vhost ioctls);
Only compile test has been done for this series for now.
RFCv3: https://patchwork.kernel.org/patch/11117785/
[1] https://lkml.org/lkml/2019/9/10/135
Tiwei Bie (3):
vfio: support getting vfio device from device fd...
2019 Sep 17
0
[RFC v4 3/3] vhost: introduce mdev based hardware backend
...DEV_S_STOPPED;
+ vhost_mdev_stop_backend(m);
+ }
+
+ vhost_dev_stop(&m->dev);
+ vhost_dev_cleanup(&m->dev);
+
+ kfree(m->dev.vqs);
+ kfree(m->vqs);
+
+ vfio_device_put(m->vfio_device);
+ vfio_group_put_external_user(m->vfio_group);
+
+ m->mdev = NULL;
+}
+
+static long vhost_mdev_set_backend(struct vhost_mdev *m,
+ struct vhost_mdev_backend __user *argp)
+{
+ struct vhost_mdev_backend backend;
+ struct mdev_device *mdev;
+ struct vhost_dev *dev;
+ struct vhost_virtqueue **vqs;
+ struct file *file;
+ struct vfio_device *device;
+ struct vfio_group *group;
+ unsigned long magic;
+...
2019 Sep 17
1
[RFC v4 3/3] vhost: introduce mdev based hardware backend
...dev_stop(&m->dev);
> + vhost_dev_cleanup(&m->dev);
> +
> + kfree(m->dev.vqs);
> + kfree(m->vqs);
> +
> + vfio_device_put(m->vfio_device);
> + vfio_group_put_external_user(m->vfio_group);
> +
> + m->mdev = NULL;
> +}
> +
> +static long vhost_mdev_set_backend(struct vhost_mdev *m,
> + struct vhost_mdev_backend __user *argp)
> +{
> + struct vhost_mdev_backend backend;
> + struct mdev_device *mdev;
> + struct vhost_dev *dev;
> + struct vhost_virtqueue **vqs;
> + struct file *file;
> + struct vfio_device *device;
> + struct...
2019 Sep 17
2
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...ding
> > doing IOMMU programming for this mdev device with VFIO's
> > container/group based interface);
> >
> > - Userspace opens /dev/vhost-mdev and gets vhost fd;
> >
> > - Userspace uses vhost ioctls to setup vhost (userspace should
> > do VHOST_MDEV_SET_BACKEND ioctl with VFIO group fd and device
> > fd first before doing other vhost ioctls);
> >
> > Only compile test has been done for this series for now.
>
>
> Have a hard thought on the architecture:
Thanks a lot! Do appreciate it!
>
> 1) Create a vhost char dev...
2019 Sep 17
2
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...ding
> > doing IOMMU programming for this mdev device with VFIO's
> > container/group based interface);
> >
> > - Userspace opens /dev/vhost-mdev and gets vhost fd;
> >
> > - Userspace uses vhost ioctls to setup vhost (userspace should
> > do VHOST_MDEV_SET_BACKEND ioctl with VFIO group fd and device
> > fd first before doing other vhost ioctls);
> >
> > Only compile test has been done for this series for now.
>
>
> Have a hard thought on the architecture:
Thanks a lot! Do appreciate it!
>
> 1) Create a vhost char dev...
2019 Sep 17
0
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...this mdev device with VFIO API (including
> doing IOMMU programming for this mdev device with VFIO's
> container/group based interface);
>
> - Userspace opens /dev/vhost-mdev and gets vhost fd;
>
> - Userspace uses vhost ioctls to setup vhost (userspace should
> do VHOST_MDEV_SET_BACKEND ioctl with VFIO group fd and device
> fd first before doing other vhost ioctls);
>
> Only compile test has been done for this series for now.
Have a hard thought on the architecture:
1) Create a vhost char device and pass vfio mdev device fd to it as a
backend and translate vhost-md...
2019 Sep 18
0
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...doing IOMMU programming for this mdev device with VFIO's
>>> container/group based interface);
>>>
>>> - Userspace opens /dev/vhost-mdev and gets vhost fd;
>>>
>>> - Userspace uses vhost ioctls to setup vhost (userspace should
>>> do VHOST_MDEV_SET_BACKEND ioctl with VFIO group fd and device
>>> fd first before doing other vhost ioctls);
>>>
>>> Only compile test has been done for this series for now.
>>
>> Have a hard thought on the architecture:
> Thanks a lot! Do appreciate it!
>
>> 1) Create...
2019 Sep 18
2
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...with VFIO's
> > > > container/group based interface);
> > > >
> > > > - Userspace opens /dev/vhost-mdev and gets vhost fd;
> > > >
> > > > - Userspace uses vhost ioctls to setup vhost (userspace should
> > > > do VHOST_MDEV_SET_BACKEND ioctl with VFIO group fd and device
> > > > fd first before doing other vhost ioctls);
> > > >
> > > > Only compile test has been done for this series for now.
> > >
> > > Have a hard thought on the architecture:
> > Thanks a lot! Do...
2019 Sep 18
2
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...with VFIO's
> > > > container/group based interface);
> > > >
> > > > - Userspace opens /dev/vhost-mdev and gets vhost fd;
> > > >
> > > > - Userspace uses vhost ioctls to setup vhost (userspace should
> > > > do VHOST_MDEV_SET_BACKEND ioctl with VFIO group fd and device
> > > > fd first before doing other vhost ioctls);
> > > >
> > > > Only compile test has been done for this series for now.
> > >
> > > Have a hard thought on the architecture:
> > Thanks a lot! Do...