search for: vhost_mdev_ioctl

Displaying 10 results from an estimated 10 matches for "vhost_mdev_ioctl".

Did you mean: vhost_dev_ioctl
2019 Sep 03
2
[RFC v3] vhost: introduce mdev based hardware vhost backend
...is way, some refactoring in vhost.c/vhost.h may be needed. > > PS. The direct mapping of the notify registers isn't implemented > in this version. > > [1] https://lkml.org/lkml/2019/7/9/101 > > Signed-off-by: Tiwei Bie <tiwei.bie at intel.com> .... > +long vhost_mdev_ioctl(struct mdev_device *mdev, unsigned int cmd, > + unsigned long arg) > +{ > + void __user *argp = (void __user *)arg; > + struct vhost_mdev *vdpa; > + unsigned long minsz; > + int ret = 0; > + > + if (!mdev) > + return -EINVAL; > + > + vdpa = mdev_get_drvdata(...
2019 Sep 03
2
[RFC v3] vhost: introduce mdev based hardware vhost backend
...is way, some refactoring in vhost.c/vhost.h may be needed. > > PS. The direct mapping of the notify registers isn't implemented > in this version. > > [1] https://lkml.org/lkml/2019/7/9/101 > > Signed-off-by: Tiwei Bie <tiwei.bie at intel.com> .... > +long vhost_mdev_ioctl(struct mdev_device *mdev, unsigned int cmd, > + unsigned long arg) > +{ > + void __user *argp = (void __user *)arg; > + struct vhost_mdev *vdpa; > + unsigned long minsz; > + int ret = 0; > + > + if (!mdev) > + return -EINVAL; > + > + vdpa = mdev_get_drvdata(...
2019 Sep 04
0
[RFC v3] vhost: introduce mdev based hardware vhost backend
...ed. > > > > PS. The direct mapping of the notify registers isn't implemented > > in this version. > > > > [1] https://lkml.org/lkml/2019/7/9/101 > > > > Signed-off-by: Tiwei Bie <tiwei.bie at intel.com> > > .... > > > +long vhost_mdev_ioctl(struct mdev_device *mdev, unsigned int cmd, > > + unsigned long arg) > > +{ > > + void __user *argp = (void __user *)arg; > > + struct vhost_mdev *vdpa; > > + unsigned long minsz; > > + int ret = 0; > > + > > + if (!mdev) > > + return -E...
2019 Sep 17
0
[RFC v4 3/3] vhost: introduce mdev based hardware backend
..._init(&m->mutex); + f->private_data = m; + + return 0; +} + +static int vhost_mdev_release(struct inode *inode, struct file *f) +{ + struct vhost_mdev *m = f->private_data; + + vhost_mdev_release_backend(m); + mutex_destroy(&m->mutex); + kfree(m); + + return 0; +} + +static long vhost_mdev_ioctl(struct file *f, unsigned int cmd, + unsigned long arg) +{ + void __user *argp = (void __user *)arg; + struct vhost_mdev *m = f->private_data; + long r; + + mutex_lock(&m->mutex); + + if (cmd == VHOST_MDEV_SET_BACKEND) { + r = vhost_mdev_set_backend(m, argp); + goto done; + } + +...
2019 Sep 17
1
[RFC v4 3/3] vhost: introduce mdev based hardware backend
...+} > + > +static int vhost_mdev_release(struct inode *inode, struct file *f) > +{ > + struct vhost_mdev *m = f->private_data; > + > + vhost_mdev_release_backend(m); > + mutex_destroy(&m->mutex); > + kfree(m); > + > + return 0; > +} > + > +static long vhost_mdev_ioctl(struct file *f, unsigned int cmd, > + unsigned long arg) > +{ > + void __user *argp = (void __user *)arg; > + struct vhost_mdev *m = f->private_data; > + long r; > + > + mutex_lock(&m->mutex); > + > + if (cmd == VHOST_MDEV_SET_BACKEND) { > + r = vhost...
2019 Sep 02
2
[RFC v3] vhost: introduce mdev based hardware vhost backend
...e_t count, loff_t *ppos) > +{ > + return -EINVAL; > +} > +EXPORT_SYMBOL(vhost_mdev_write); > + > +int vhost_mdev_mmap(struct mdev_device *mdev, struct vm_area_struct *vma) > +{ > + // TODO > + return -EINVAL; > +} > +EXPORT_SYMBOL(vhost_mdev_mmap); > + > +long vhost_mdev_ioctl(struct mdev_device *mdev, unsigned int cmd, > + unsigned long arg) > +{ > + void __user *argp = (void __user *)arg; > + struct vhost_mdev *vdpa; > + unsigned long minsz; > + int ret = 0; > + > + if (!mdev) > + return -EINVAL; > + > + vdpa = mdev_get_drvdata(...
2019 Sep 02
2
[RFC v3] vhost: introduce mdev based hardware vhost backend
...e_t count, loff_t *ppos) > +{ > + return -EINVAL; > +} > +EXPORT_SYMBOL(vhost_mdev_write); > + > +int vhost_mdev_mmap(struct mdev_device *mdev, struct vm_area_struct *vma) > +{ > + // TODO > + return -EINVAL; > +} > +EXPORT_SYMBOL(vhost_mdev_mmap); > + > +long vhost_mdev_ioctl(struct mdev_device *mdev, unsigned int cmd, > + unsigned long arg) > +{ > + void __user *argp = (void __user *)arg; > + struct vhost_mdev *vdpa; > + unsigned long minsz; > + int ret = 0; > + > + if (!mdev) > + return -EINVAL; > + > + vdpa = mdev_get_drvdata(...
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
2019 Sep 03
0
[RFC v3] vhost: introduce mdev based hardware vhost backend
...uct vhost_mdev *vdpa); > > + > > +ssize_t vhost_mdev_read(struct mdev_device *mdev, char __user *buf, > > + size_t count, loff_t *ppos); > > +ssize_t vhost_mdev_write(struct mdev_device *mdev, const char __user *buf, > > + size_t count, loff_t *ppos); > > +long vhost_mdev_ioctl(struct mdev_device *mdev, unsigned int cmd, > > + unsigned long arg); > > +int vhost_mdev_mmap(struct mdev_device *mdev, struct vm_area_struct *vma); > > +int vhost_mdev_open(struct mdev_device *mdev); > > +void vhost_mdev_close(struct mdev_device *mdev); > > + > &...