search for: vdpa_mmap

Displaying 8 results from an estimated 8 matches for "vdpa_mmap".

2018 Apr 02
2
[RFC] vhost: introduce mdev based hardware vhost backend
...mdev instances. ssize_t vdpa_read(struct mdev_device *mdev, char __user *buf, size_t count, loff_t *ppos); ssize_t vdpa_write(struct mdev_device *mdev, const char __user *buf, size_t count, loff_t *ppos); long vdpa_ioctl(struct mdev_device *mdev, unsigned int cmd, unsigned long arg); int vdpa_mmap(struct mdev_device *mdev, struct vm_area_struct *vma); int vdpa_open(struct mdev_device *mdev); void vdpa_close(struct mdev_device *mdev); Each accelerator driver just needs to implement its own create()/remove() ops, and provide a vdpa device ops which will be called by the generic mdev emulation...
2018 Apr 02
2
[RFC] vhost: introduce mdev based hardware vhost backend
...mdev instances. ssize_t vdpa_read(struct mdev_device *mdev, char __user *buf, size_t count, loff_t *ppos); ssize_t vdpa_write(struct mdev_device *mdev, const char __user *buf, size_t count, loff_t *ppos); long vdpa_ioctl(struct mdev_device *mdev, unsigned int cmd, unsigned long arg); int vdpa_mmap(struct mdev_device *mdev, struct vm_area_struct *vma); int vdpa_open(struct mdev_device *mdev); void vdpa_close(struct mdev_device *mdev); Each accelerator driver just needs to implement its own create()/remove() ops, and provide a vdpa device ops which will be called by the generic mdev emulation...
2018 Apr 10
0
[RFC] vhost: introduce mdev based hardware vhost backend
...vdpa_read(struct mdev_device *mdev, char __user *buf, > size_t count, loff_t *ppos); > ssize_t vdpa_write(struct mdev_device *mdev, const char __user *buf, > size_t count, loff_t *ppos); > long vdpa_ioctl(struct mdev_device *mdev, unsigned int cmd, unsigned long arg); > int vdpa_mmap(struct mdev_device *mdev, struct vm_area_struct *vma); > int vdpa_open(struct mdev_device *mdev); > void vdpa_close(struct mdev_device *mdev); > > Each accelerator driver just needs to implement its own > create()/remove() ops, and provide a vdpa device ops > which will be called...
2019 Jul 03
0
[RFC v2] vhost: introduce mdev based hardware vhost backend
...CE_RESET: > + return vdpa_reset(mdev); > + } > + return -ENOTTY; > +} > +EXPORT_SYMBOL(vdpa_ioctl); > + > +static const struct vm_operations_struct vdpa_mm_ops = { > +#ifdef CONFIG_HAVE_IOREMAP_PROT > + .access = generic_access_phys > +#endif > +}; > + > +int vdpa_mmap(struct mdev_device *mdev, struct vm_area_struct *vma) > +{ > + struct vdpa_dev *vdpa; > + unsigned int index; > + loff_t pos; > + loff_t offset; > + int qid, ret; > + > + vdpa = mdev_get_drvdata(mdev); > + if (!vdpa) > + return -ENODEV; > + > + pos = vma->vm_...
2019 Jul 03
4
[RFC v2] vhost: introduce mdev based hardware vhost backend
...unt, data); + + kfree(data); + return ret; + } + case VFIO_DEVICE_RESET: + return vdpa_reset(mdev); + } + return -ENOTTY; +} +EXPORT_SYMBOL(vdpa_ioctl); + +static const struct vm_operations_struct vdpa_mm_ops = { +#ifdef CONFIG_HAVE_IOREMAP_PROT + .access = generic_access_phys +#endif +}; + +int vdpa_mmap(struct mdev_device *mdev, struct vm_area_struct *vma) +{ + struct vdpa_dev *vdpa; + unsigned int index; + loff_t pos; + loff_t offset; + int qid, ret; + + vdpa = mdev_get_drvdata(mdev); + if (!vdpa) + return -ENODEV; + + pos = vma->vm_pgoff << PAGE_SHIFT; + + index = VDPA_VFIO_VHOST_OFFSE...
2019 Jul 03
4
[RFC v2] vhost: introduce mdev based hardware vhost backend
...unt, data); + + kfree(data); + return ret; + } + case VFIO_DEVICE_RESET: + return vdpa_reset(mdev); + } + return -ENOTTY; +} +EXPORT_SYMBOL(vdpa_ioctl); + +static const struct vm_operations_struct vdpa_mm_ops = { +#ifdef CONFIG_HAVE_IOREMAP_PROT + .access = generic_access_phys +#endif +}; + +int vdpa_mmap(struct mdev_device *mdev, struct vm_area_struct *vma) +{ + struct vdpa_dev *vdpa; + unsigned int index; + loff_t pos; + loff_t offset; + int qid, ret; + + vdpa = mdev_get_drvdata(mdev); + if (!vdpa) + return -ENODEV; + + pos = vma->vm_pgoff << PAGE_SHIFT; + + index = VDPA_VFIO_VHOST_OFFSE...
2018 Apr 10
4
[RFC] vhost: introduce mdev based hardware vhost backend
...vice *mdev, char __user *buf, > > size_t count, loff_t *ppos); > > ssize_t vdpa_write(struct mdev_device *mdev, const char __user *buf, > > size_t count, loff_t *ppos); > > long vdpa_ioctl(struct mdev_device *mdev, unsigned int cmd, unsigned long arg); > > int vdpa_mmap(struct mdev_device *mdev, struct vm_area_struct *vma); > > int vdpa_open(struct mdev_device *mdev); > > void vdpa_close(struct mdev_device *mdev); > > > > Each accelerator driver just needs to implement its own > > create()/remove() ops, and provide a vdpa device ops...
2018 Apr 10
4
[RFC] vhost: introduce mdev based hardware vhost backend
...vice *mdev, char __user *buf, > > size_t count, loff_t *ppos); > > ssize_t vdpa_write(struct mdev_device *mdev, const char __user *buf, > > size_t count, loff_t *ppos); > > long vdpa_ioctl(struct mdev_device *mdev, unsigned int cmd, unsigned long arg); > > int vdpa_mmap(struct mdev_device *mdev, struct vm_area_struct *vma); > > int vdpa_open(struct mdev_device *mdev); > > void vdpa_close(struct mdev_device *mdev); > > > > Each accelerator driver just needs to implement its own > > create()/remove() ops, and provide a vdpa device ops...